不知道为什么我会收到mailgun错误:禁止

时间:2019-05-06 09:15:41

标签: mailgun

我在Mac上将Mailgun-js@0.22.0与Node.js v8.15.1结合使用

我收到一个禁止的错误:,这是我的代码-

const emailConfig = {
apiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
domain: 'mail.cloud-invoices.co.uk',
host: 'api.eu.mailgun.net'
};
var mailgun = require('mailgun-js')(emailConfig);

const data = {
from: 'Excited User info@mail.cloud-invoices.co.uk',
to: 'info@bigswebdesign.co.uk',
subject: 'Hello',
text: 'Testing some Mailgun awesomness!'
};

mailgun.messages().send(data, (error, body) => {
if(error) throw error;
console.log(body);
});

有什么想法吗?

谢谢, 斯图尔特

0 个答案:

没有答案