user2141107
user2141107

Reputation: 39

MeteorJS email configuration SSL

I am trying to send emails from Meteor JS and took the simplest approach found in the documentation. However, sending fails and I get the following stack trace:

Exception while invoking method 'sendEmail' Error: connect ETIMEDOUT
at Object.Future.wait (/usr/lib64/meteor/lib/node_modules/fibers/future.js:322:15)
at smtpSend (app/packages/email/email.js:69:43)
at Object.Email.send (app/packages/email/email.js:111:7)
at Meteor.methods.sendEmail (app/server/email.js:7:11)
at _.extend.protocol_handlers.method.exception (app/packages/livedata/livedata_server.js:593:30)
at _.extend.withValue (app/packages/meteor/dynamics_nodejs.js:33:19)
at app/packages/livedata/livedata_server.js:592:46
at _.extend.withValue (app/packages/meteor/dynamics_nodejs.js:33:19)
at _.extend.protocol_handlers.method (app/packages/livedata/livedata_server.js:591:37)
at _.extend.processMessage.processNext (app/packages/livedata/livedata_server.js:484:43)
- - - - -
at errnoException (net.js:770:11)
at Object.afterConnect [as oncomplete] (net.js:761:19)

I provide my email settings in bootstrap.js in the server folder via this line:

process.env.MAIL_URL = "smtp://[email protected]:[email protected]:465"

I am pretty sure I also have to switch on SSL somewhere, but I do not know how (I could probably use Node's email.js alone).

Upvotes: 3

Views: 1923

Answers (1)

jacksondc
jacksondc

Reputation: 600

Found it myself - it was not the lack of setting the SSL option, but the first '@gmail.com' in MAIL_URL. The correct line is:

process.env.MAIL_URL = "smtp://user:[email protected]:465"

Upvotes: 1

Related Questions