【问题标题】:Mailgun: Emails accepted but not delivered for addresses with the same domainMailgun:已接受但未为具有相同域的地址发送的电子邮件
【发布时间】:2021-01-04 04:31:07
【问题描述】:

我在使用 mailgun 发送电子邮件时遇到问题。与我的 mailgun 域具有相同域的电子邮件地址不接收电子邮件(具有其他域的其他地址可以)。

如果我的 Mailgun 域是 domain.com,我无法发送到 test@domain.com,例如

在mailgun上的日志中,表明邮件被接受(但从未送达)。

这是我的代码,但我认为这是 mailgun 配置问题。

const mg = mailgun({ apiKey: process.env.MAILGUN_API_KEY, domain: process.env.MAILGUN_DOMAIN, host: process.env.MAILGUN_HOST })

const data = ...

mg.messages().send(data, function (error, body) {
    if(error) {
        console.log(error)
        const err = new Error('Error sending email')
        err.code = 500
        throw err
    }
})

此查询没有任何错误,我认为我正确配置了 DNS 记录。

MX:

主机名 | 优先级 | 当前值

域名.com | 10 | mxa.eu.mailgun.org

域名.com | 10 | mxb.eu.mailgun.org

TXT 记录也已配置

感谢您的帮助

【问题讨论】:

    标签: node.js mailgun


    【解决方案1】:

    解决

    就我而言,我只需要在 mailgun 中使用一个子域。我使用 subdomain.domain.com

    而不是 domain.com

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-13
      • 2019-04-05
      • 1970-01-01
      • 2018-07-02
      • 1970-01-01
      • 1970-01-01
      • 2022-09-28
      • 2016-09-28
      相关资源
      最近更新 更多