无法使用Mailgun向自定义域名(非Gmail/Hotmail电子邮件)发送电子邮件

3

当用户注册时,我会发送确认邮件(及其他邮件)。问题在于,当我发送到非gmail、hotmail或任何大型电子邮件服务的地址时,邮件头中会出现错误。

{
  "severity": "permanent",
  "tags": [],
  "delivery-status": {
    "tls": false,
    "mx-host": "mxer.customdomain.com",
    "code": 553,
    "description": null,
    "session-seconds": 6.566637992858887,
    "message": "553 5.1.8 <user@customdomain.com>... Domain of sender address bounce+e06614.0f9698-user=customdomain.com@mg.mydomain.com does not exist",
    "certificate-verified": false
  },
  "envelope": {
    "transport": "smtp",
    "sender": "accounts@mydomain.com",
    "sending-ip": "123.45.678.900",
    "targets": "user@customdomain.com"
  },
  "recipient-domain": "customdomain.com",
  "id": "AbCDeFGhiJk_lMn",
  "campaigns": [],
  "reason": "generic",
  "user-variables": {},
  "flags": {
    "is-routed": null,
    "is-authenticated": true,
    "is-system-test": false,
    "is-test-mode": false
  },
  "log-level": "error",
  "timestamp": 1456123374.411238,
  "message": {
    "headers": {
      "to": "First Last <user@customdomain.com>",
      "message-id": "56caade72ed26_***********9@6e5120c5-0d27-4491-a430-1a2dc4e6b862.mail",
      "from": "Team Accounts <accounts@mydomain.com>",
      "subject": "Confirmation instructions"
    },
    "attachments": [],
    "recipients": [
      "user@customdomain.com"
    ],
    "size": 1143
  },
  "recipient": "user@customdomain.com",
  "event": "failed"
}

我设置邮件头的时候有问题吗?还是在发送邮件到自定义域之前需要设置一些配置?

1个回答

3

对于一些电子邮件服务,为了验证发件人身份,需要你的域名/子域名具有有效的“接收”MX记录(对于Mailgun而言是mg.mydomain.com)。我添加了MX记录。

10 mxa.mailgun.org
10 mxb.mailgun.org

针对 mg.mydomain.com 进行了操作,看起来已经生效。


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