Vincent
Vincent

Reputation: 483

Meteor error on email sending

I don't understand why meteor fails on sending email only in production. In development mode, mail are send without any issue, and in production it fails when the app is run with node.

Here are my versions:

Package:

In development:

In production:

Sending email: to: [email protected], from: '[email protected]', subject: My subject, text: basic email content

TypeError: Cannot assign to read only property 'reconnectCount' of false at SMTPClient._actionAUTHComplete (/var/www/bundle/programs/server/npm/node_modules/meteor/email/node_modules/simplesmtp/lib/client.js:823:34) at SMTPClient._onData (/var/www/bundle/programs/server/npm/node_modules/meteor/email/node_modules/simplesmtp/lib/client.js:329:29) at emitOne (events.js:77:13) at TLSSocket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:153:18) at TLSSocket.Readable.push (_stream_readable.js:111:10) at TLSWrap.onread (net.js:531:20)

Thank you for your help :)

Upvotes: 1

Views: 139

Answers (1)

Vincent
Vincent

Reputation: 483

The solution was the one suggested by @Tdm: using the node version provided by meteor.

But, it was a bit tricky to integrate with CI (eslint, sass-lint) who require a recent version of node, so here's how I proceed:

  • For my CI lint tests, I use a recent version (v4.4). Set in gitlab CI
  • For my production environment, I build another docker machine, based on node v0.10.46 (even if current Meteor is based on v0.10.45).

Thank you Tdm for pointing the issue !

Upvotes: 0

Related Questions