Email doesn't work after update to 1.5

Today I’ve updated my project to 1.5 and standard Email package stopped sending emails. I didn’t change my code for this part and it’s worked before. The strange thing is that there is also no error. On Email.send() it just stucks. When I’m trying to debug using WebStorm’s debugger on executing new OriginalEmailFunction(options) in Results I’m getting Evaluating… that doesn’t proceed further

Can you provide a censored/redacted example (without username/password) of what your MAIL_URL looks like?

process.env.MAIL_URL = `smtp://${Meteor.settings.MAIL.USER}:${Meteor.settings.MAIL.PASS}`;

Can you try changing smtp:// to smtps:// and see if it fixes your problem?

Port 465 is a secure port (as are all Gmail e-mail transport ports) and smtp:// is an insecure scheme – smtps:// is the secure version of the scheme (in the same way that http:// and https:// differ).

Yeah, that’s helped. Thanks, man. I’m just wondered why it was working yesterday and stopped working today?

I’m not sure what your previous version of the email package was (you said you upgraded, which means you probably had many package updates as well), but there were major upgrades to the email package recently.

An older version of email automatically assumed that if you had port 465 that you meant smtps:// which isn’t really fair since just as you can (but wouldn’t typically) run (SSL on port 80), you can also run an insecure mail server on port 465. While a bizarre configuration, this is really a decision that the developer should make and not Meteor.

I’ll release a new version of email soon with applied which will provide future users an informative message about this instead of leaving them to post on the forums. :wink:

1 Like

I just published email@1.2.3 with the warning message from Hope this helps others in the future!

1 Like