发送邮件超时

sending email times out

尝试发送电子邮件时总是出现超时错误:

Exception while invoking method 'sendEmail' Error: connect ETIMEDOUT

MAIL_URL 变量在 server/lib 文件夹中设置如下:

Meteor.startup(function () {
  var user = "username@sandbox************.mailgun.org",
    pass = "***********",
    host = "smtp.mailgun.org",
    port = 25,
    url = "smtp://" + user + ":" + pass + "@" + host + ":" + port + "/";

  process.env.MAIL_URL = url;
});

您的 ISP 很可能阻止 port 25 以防止您发送垃圾邮件。参见 here for reference. Something else like 587 will do. See this example