我希望能从heroku域名 <appname>@herokuapp.com
发送邮件。
首先,我在heroku上安装了mailgun插件并尝试发送邮件,但是出现了以下错误:
smtplib.SMTPDataError: (554, b'Sandbox subdomains are for test purposes only. Please add your own domain or add the address to authorized recipients in Account Settings.')
然而,我在mailgun页面创建了域名<appname>@herokuapp.com
,但需要进行域名验证。
请问我应该选择哪个作为域名?以及如何配置它们?非常感谢。
heroku config:edit
显示:
MAILGUN_API_KEY=3fe2*****ae1a
MAILGUN_DOMAIN=sandbox*****d5cb.mailgun.org
MAILGUN_KEY=3fe2****ae1a
MAILGUN_PUBLIC_KEY=pubkey-b******a
MAILGUN_SMTP_LOGIN='postmaster@sandbox*******.mailgun.org'
MAILGUN_SMTP_PASSWORD=b018******7840
MAILGUN_SMTP_PORT=587
MAILGUN_SMTP_SERVER=smtp.mailgun.org
MAILGUN_VALIDATIONS_PUBLIC_KEY='[200]'