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 1.4.4.1 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.
The issue has appeared to have corrected itself for me.
I removed the email package (1.2.0) and then tried adding in 1.2.0 back in. After that the emails seem to reliably send. I also updated to 1.2.1 and they also send correctly.
I can only assume the email package somehow got corrupted and removing/adding back in corrected it.
I tested email package using several combinations of versions of this package and meteor. Meteor 1.4.4.1 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
or
Downgrading to meteor 1.4.3.2 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).
Error: Timeout
at SMTPConnection._onTimeout (/var/www/asambleaEnLinea_release/programs/server/npm/nod
e_modules/meteor/email/node_modules/smtp-connection/lib/smtp-connection.js:582:26)
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.
Did you find a fix?
I deployed my 1.4.4.2 app on Galaxy with email@1.2.1, using smtps in the MAIL_URL (mailgun port 587) and I’m getting the same ‘SSL23_GET_SERVER_HELLO’ error.
Thanks for your help! I reverted MAIL_URL back to smtp and Email.send works again. I didn’t know about STARTTLS and didn’t realize it would try upgrading to a secure connection by itself.
I’m having the same issue!!! It works when I start up a fresh instance, but eventually jus stops sending emails and doesn’t throw an error… this is a recent thing. I’m on 1.4
This also just started for me. I am running Meteor 1.3.4.1, 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.