我设法弄清楚如何通过Mandrill发送电子邮件和使用Back4App发送Parse Cloud Code。检查Mandrill的API日志时,我看到以下内容:
Full Request
{
"message": {
"text": "asdf Email Test",
"subject": "adsf Email Test",
"from_email": "no-reply@asdf.ca",
"from_name": "Site",
"to": [
{
"email": "myemail@gmail.com",
"name": "Martin",
"type": "to"
}
],
"headers": {
"Reply-To": "no-reply@adsf.ca"
}
},
"async": false,
"ip_pool": "Main Pool",
"send_at": "2018-03-13T17:14:41.645Z",
"key": "oc7ueJMLRGgaEDrjhk5DBg"
}
Full Response
[
{
"email": "myemail@gmail.com",
"status": "queued",
"_id": "7c28e80e4de1405f93d1d096600128d4",
"reject_reason": null
}
]
好像代码正在正常执行但响应正文表明电子邮件已排队。我决定等24小时,一切都没有改变。我发送了一些测试电子邮件,得到了相同的结果。基本上,电子邮件不发送。发生了什么事?
答案 0 :(得分:1)
显然,对于Mandrill使用Back4App,您需要设置一个自己的域,看起来您正在使用Gmail电子邮件地址。因此,建议在这种情况下使用SendGrid:)