I have been successfully using the meteor email package (pointing to a MailGun smtp server) for my project but in the last few weeks have been having issues with the call to Email.send randomly never returning.
When this happens I don’t receive any errors on either the client or the server - the Email.send method just seems to hang.
I tend to find it works when the meteor server is restarted but after a few emails will just hang again.
I am wondering whether it could be anything to do with updating to Meteor 184.108.40.206 as I notice someone else has an email issue (although they are at least getting an error).
Has anyone experienced this issue or have any ideas of what I can do to track down the problem?
I have experienced this issue, different servers (prod/dev) and different e-mail providers. On dev I even had my server process crash after sending e-mails and when it got restarted it picked up where it left off, repeating the last action, resulting in multiple duplicate entries in a collection … very odd indeed.
I tested email package using several combinations of versions of this package and meteor. Meteor 220.127.116.11 fails with email package versions 1.2.0 and 1.2.1. At first, operation Email.send fails to send any message (wireshark TCP protocol analyzer shows meteor trying to open an STMP connection which is never used to send email message). After solution proposed by matt90410 (reinstalling email package) operation Email.send succed in sending email message, but continues to fail and after a pair of minutes a timeout error or reported by jamgold shows killing Meteor/NodeJS server, which is very bad for production environments.
This situation is perhaps related with
Downgrading to meteor 18.104.22.168 and email package 1.1.18 does not help, problem persists… email message is delivered but operation Email.send does not return. Running thread/fiber is killed after a time by a timeout, killing Meteor/NodeJS server, although less unstable (same problem, more difficult to reproduce).
at SMTPConnection._onTimeout (/var/www/asambleaEnLinea_release/programs/server/npm/nod
at emitNone (events.js:67:13)
at TLSSocket.emit (events.js:166:7)
at TLSSocket.Socket._onTimeout (net.js:332:8)
at _runOnTimeout (timers.js:524:11)
at _makeTimerTimeout (timers.js:515:3)
at Timer.unrefTimeout (timers.js:584:5)
We had what sounds like your problem. It manifested after upgrading email from 1.1.18 to 1.2.0. We were using smtp:// and port 587 in the MAIL_URL.
Switching the protocol to smtps resulted in a crash with the error SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol on sending (which makes sense as 587 isn’t necessarily TLS). Upgrading email to 1.2.1 seems to have fixed it.
I haven’t dug into exactly what the original issue was. We had the same Timeout error you mention above with email 1.2.0. I think I saw a mention that it may be something to do with the STARTTLS exchange. I’m afraid I can’t find that comment at the moment, but it sounds reasonable.
This also just started for me. I am running Meteor 22.214.171.124, and email was working but now just stops random ‘Greeting never received’. If starts again if I restart the app. I have not recently upgraded my meteor version, but I did upgrade my ubuntu packages recently. Is there a change there? I’m on ubuntu 14.04. I use nullmailer.