Meteor email package causes "Connection closed unexpectedly" error

Had this today on our Production server, does anyone know if this is a hiccup of is something broken in the Meteor email package?

Error: Connection closed unexpectedly

at SMTPConnection._onClose (/built_app/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:824:34)

at TLSSocket.SMTPConnection._onSocketClose (/built_app/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer/lib/smtp-connection/index.js:197:42)

at Object.onceWrapper (events.js:422:26)

at TLSSocket.emit (events.js:327:22)

at TLSSocket.EventEmitter.emit (domain.js:483:12)

at net.js:674:12

at Socket.done (_tls_wrap.js:567:7)

at Object.onceWrapper (events.js:422:26)

at Socket.emit (events.js:315:20)

at Socket.EventEmitter.emit (domain.js:483:12)

at TCP.<anonymous> (net.js:674:12) {


command: 'CONN'


Looks like an error when the other side of the connection closes the connection abruptly e.g. normally outside of our app’s control

Thank you, will check with the user though he hasn’t reported that he has closed the app immediately.

The smtp server is the one the closes the connection abruptly

Thanks for clarifying that it’s not our app. Now I wonder why Mailgun is doing this (which we use for transaction mail service and pay them too).

I normally see these in our logs from 3rd party services

Hi guys,

I’m not sure if it’s related or not, but I was having some issues with Meteor’s Email functionality a couple of days ago too.

I’m using SendGrid and emails appeared to be sending correctly through SendGrid but were being rejected / not delivered further down the line.

Making calls to the SendGrid API would send emails perfectly fine, but Meteor’s Email.send function would not send emails with SendGrid’s headers attached.

It might have been a mistake in my part, but it seemed like coincidental timing, so thought I’d mention it.