我正在将 Mailgun 用于我维护的网站,通常 Mailgun 工作得很好,但我遇到了一个奇怪的问题。我的脚本调用 HTTP API 使用 Mailgun 发送消息,然后这些消息在我的日志中显示为“已接受”,但随后需要很长时间才能“传送”,通常根本无法传送,只是保留为“公认”。有没有人遇到过类似的错误,或者有人可以提出修复它的方法吗?我猜它是在提供给 API 的参数中,但我一辈子都无法解决这个问题。
不同的收件人域和一天中的不同时间都存在该问题。
有问题的消息的 JSON 日志如下。当然,我已经更改了地址和域。
{
"tags": [],
"timestamp": 1411498829.247304,
"envelope": {
"targets": "[email protected] /cdn-cgi/l/email-protection",
"transport": "",
"sender": "[email protected] /cdn-cgi/l/email-protection"
},
"recipient-domain": "address.com",
"event": "accepted",
"campaigns": [],
"user-variables": {},
"flags": {
"is-authenticated": true,
"is-system-test": false,
"is-test-mode": false
},
"message": {
"headers": {
"to": "[email protected] /cdn-cgi/l/email-protection",
"message-id": "[email protected] /cdn-cgi/l/email-protection",
"from": "\"the-site-in-question.com\" <[email protected] /cdn-cgi/l/email-protection>",
"subject": "Dom, your password was reset."
},
"attachments": [],
"recipients": [
"[email protected] /cdn-cgi/l/email-protection"
],
"size": 556
},
"recipient": "[email protected] /cdn-cgi/l/email-protection",
"method": "http"
}