如何在Heroku上配置Mailgun附加组件

3

我希望能从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]'
1个回答

0

对于第一次测试,您应该按照上面所见的Mailgun响应进行操作:

在Mailgun中配置有效的收件人电子邮件地址。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接