发送有关nitrousIO的电子邮件

时间:2015-03-10 21:23:20

标签: meteor nitrousio mailgun

我正试图从我的流星nitrousIO盒发送电子邮件。

我的代码是这样的:

Meteor.call('sendEmail', "test@gmail.com");



Meteor.startup(function() {

  process.env.MAIL_URL = 'smtp://postmaster%40sandboxfa4f94a7fcbe4ca488d95a6d22cb4c63.mailgun.org:PASSWORD%@smtp.mailgun.org:587';


  Meteor.methods({
    'sendContactEmail': function() {
      this.unblock();

        Email.send({
      from: "genjurosama@gmail.com",
      to: "genjurosama@gmail.com",
      replyTo: "genjurosama@gmail.com" || undefined,
      subject: "Meteorize:  sent you this email !",
      text: "Hello ,\n\n"
    });
      console.log("mail sent");
    }

  });
});

我收到此错误:

     Exception while invoking method 'sendEmail' URIError: URI malformed
I20150310-21:19:59.627(0)?     at decodeURIComponent (native)
I20150310-21:19:59.628(0)?     at Url.parse (url.js:185:19)
I20150310-21:19:59.628(0)?     at Object.urlParse [as parse] (url.js:101:5)
I20150310-21:19:59.628(0)?     at makePool (packages/email/email.js:9:1)
I20150310-21:19:59.628(0)?     at packages/email/email.js:50:1
I20150310-21:19:59.628(0)?     at Object.AppConfig.configurePackage (packages/application-configuration/config.js:120:1)
I20150310-21:19:59.628(0)?     at getPool (packages/email/email.js:43:1)
I20150310-21:19:59.628(0)?     at Object.Email.send (packages/email/email.js:166:1)
I20150310-21:19:59.628(0)?     at [object Object].Meteor.methods.sendEmail (app/server/email/config.js:24:13)
I20150310-21:19:59.629(0)?     at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1599:1)

可能是亚硝酸盐导致问题吗? 我也尝试使用mailgun包,它也会遇到同样的问题

0 个答案:

没有答案