我正在尝试将 django-anymail 与 mailgun 集成。当我使用 django send_mail 发送邮件时
send_mail('Testing', 'Test dsadsadsa asdsa body', 'xyz@mailinator.com', ['xxxx@gmail.com'])
它给出了一个错误:
AnymailRequestsAPIError: Sending a message to xxxx@gmail.com from xyz@mailinator.com
ESP API response 404:
{
"message": "Domain not found: mailinator.com"
}
我怎样才能摆脱这个?
我的设置文件包含以下内容:
ANYMAIL = {
"MAILGUN_API_KEY": "key-xxxmyprivatekey",
}
EMAIL_BACKEND = "anymail.backends.mailgun.MailgunBackend"
DEFAULT_FROM_EMAIL = "no-reply@mailinator.com"