Mandrill" reject_reason":" unsigned"

时间:2016-07-13 15:02:12

标签: javascript ajax email mandrill

我尝试使用mandrill电子邮件服务发送电子邮件,但我收到以下错误:

[
    {
        "email": "pranav_withyou@hotmail.com",
        "status": "rejected",
        "_id": "daab0daa538a4fe9b161be709593be0b",
        "reject_reason": "unsigned"
    }
]

我正试图在javascript中使用ajax调用发送电子邮件,如:

    $.ajax({
        type: "POST",
        url: "https://mandrillapp.com/api/1.0/messages/send.json",
        data: {
            "key": "RemovedforSecurityitscorrect",
            "message": {
                "html": "<p>Example HTML content</p>",
                "text": $('#emailText').val(),
                "subject": $('#emailSubject').val(),
                "from_email": $('#fromEmail').val(),
                "from_name": $('#fromName').val(),
                "to": [{
                        "email": $('#toEmail').val(),
                        "name": $('#recipientName').val(),
                        "type": "to"
                }],
                "headers": {
                    "Reply-To": $('#fromName').val()
                }
            },
            success: function (data) {
                console.log("Email Sent");
            },
            error: function (xhr, status, error) {
                console.log("Error while sending mail");
            }
        }
    });

所有价值观都来自ajax call&amp;从响应中调用服务器。有什么问题?

1 个答案:

答案 0 :(得分:14)

我明白了,这是一个愚蠢的错误。我试图通过我的个人电子邮件ID发送邮件,该电子邮件ID位于不同的域,而不是Mandrill配置的电子邮件ID&amp;验证。

搜索错误原因后,我发现当从未经验证的域或域发送的没有有效SPF和DKIM记录的邮件将被拒绝时,使用reject_reason,unsigned 时会发送此错误。< / p>

enter image description here

有关更多信息,请参阅

进行与SPF相关的必要设置&amp; Mandrill的DKIM请参考:

https://mandrill.zendesk.com/hc/en-us/articles/205582277-How-do-I-add-DNS-records-for-my-sending-domains-