最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

从hostmonster托管的SMTP使用nodemailer发送的电子邮件未传递给收件人

IT培训 admin 5浏览 0评论

从hostmonster托管的SMTP使用nodemailer发送的电子邮件未传递给收件人

我们的SMTP服务器托管在hostmonster上。我们正在使用nodemailer从我们的应用程序向用户发送电子邮件。我面临的问题是,我从SMTP服务器收到250 OK响应,但是电子邮件没有传递给用户。我使用的是Hostmonster提供的确切电子邮件配置。我们的nodemailer配置为:

var mailTransporter = nodemailer.createTransport({
host: "mail.domain",
port: 456,
secure: true,
auth: {
  user: "[email protected]",
  pass: "password"
},
tls: {
        rejectUnauthorized: false,
     },
});

以及得到的答复:

{ accepted: [ '[email protected]' ],
  rejected: [],
  envelopeTime: 899,
  messageTime: 315,
  messageSize: 3464,
  response: '250 OK id="someid"',
  envelope:
   { from: '[email protected]',
     to: [ '[email protected]' ] },
  messageId: '<[email protected]>' }

我希望电子邮件能够传递给用户(收件人),但不会传递。谁能验证我的nodemailer配置?我的nodemailer配置是否存在任何问题?或主持人方面是否有任何问题?

回答如下:

原来,我需要在createTransport()配置中添加“名称”选项。名称应为域名,即“ www.domain”。

var mailTransporter = nodemailer.createTransport({
name: "www.domain",
host: "mail.domain",
port: 456,
secure: true,
auth: {
  user: "[email protected]",
  pass: "password"
},
tls: {
        rejectUnauthorized: false,
     },
});

参考:https://github/nodemailer/nodemailer/issues/677

从hostmonster托管的SMTP使用nodemailer发送的电子邮件未传递给收件人

我们的SMTP服务器托管在hostmonster上。我们正在使用nodemailer从我们的应用程序向用户发送电子邮件。我面临的问题是,我从SMTP服务器收到250 OK响应,但是电子邮件没有传递给用户。我使用的是Hostmonster提供的确切电子邮件配置。我们的nodemailer配置为:

var mailTransporter = nodemailer.createTransport({
host: "mail.domain",
port: 456,
secure: true,
auth: {
  user: "[email protected]",
  pass: "password"
},
tls: {
        rejectUnauthorized: false,
     },
});

以及得到的答复:

{ accepted: [ '[email protected]' ],
  rejected: [],
  envelopeTime: 899,
  messageTime: 315,
  messageSize: 3464,
  response: '250 OK id="someid"',
  envelope:
   { from: '[email protected]',
     to: [ '[email protected]' ] },
  messageId: '<[email protected]>' }

我希望电子邮件能够传递给用户(收件人),但不会传递。谁能验证我的nodemailer配置?我的nodemailer配置是否存在任何问题?或主持人方面是否有任何问题?

回答如下:

原来,我需要在createTransport()配置中添加“名称”选项。名称应为域名,即“ www.domain”。

var mailTransporter = nodemailer.createTransport({
name: "www.domain",
host: "mail.domain",
port: 456,
secure: true,
auth: {
  user: "[email protected]",
  pass: "password"
},
tls: {
        rejectUnauthorized: false,
     },
});

参考:https://github/nodemailer/nodemailer/issues/677

发布评论

评论列表 (0)

  1. 暂无评论