I am using the following to send emails which works on localhost but not my server.
// server
Meteor.startup(function () {
process.env.MAIL_URL=\"smtp://
Just use the email package with
meteor add email
Then sending email will work. Mine works with port 587 in my config.
Meteor.startup(function () {
process.env.MAIL_URL = 'smtp://user%40gmail.com:password@smtp.gmail.com:587';
});
I encountered a similar problem. The method send email work locally but not on the hosting modulus. For my part this was due to a blocking google security (access to my gmail account from Seattle while I live in France has probably seemed fishy to google). I went through several pages to authorize less strict connections to my gmail account. On this page I saw the blockage. So I allowed the less secure applications and allowed access to my account.
If it helps someone ..
You need to URL encode your username and password else Meteor confuses the two '@' signs with each other.
You could do this in your JS console (with encodeURIComponent(username)
) and usually end up with something like
user%40gmail.com:password@smtp.gmail.com:465
You could use Mailgun in the same way, or Mandrill, or any other smtp provider. It's just the username format causing the issues.