2017-03-07 31 views
1

我建立一个电子邮件验证的应用程序,并使用Mailgun的邮件客户端,与mailgun-JS。Mailgun-JS是扔我一个301错误

我用这对我的数据:

{"from":"[email protected]", 
"to":"[email protected]", 
"subject":"Verify your email", 
"text":"Hello,<br> Please click on the link to verify your email.<br><a href=https://mail-verification-baruchkogan.c9users.io/verify/borisbaruch kogan/Zr6expRlUhnKrXzBHg9X1gyT9laFSl1w91wrESv4B25tWnBDSphp8wKLTbeV4cFf>Click here to verify</a>" 
} 

而与此函数调用它:

mailgun.messages().send(data, function (error, body) { 
if(error) {console.log('mailgun error: ', error)} 
console.log(body); } 

将返回:

mailgun error: { [Error: 

<title>301 Moved Permanently</title> 
301 Moved Permanently 

nginx ] statusCode: 301 } undefined` 

我在做什么错?

回答

0

确保你已经在你的mailgun初始化中设置了domain