Meteor Email process.env.MAIL_URL error


#1

I’m trying to send emails with mailgun.
The method is correct as I have previously tested with gmail (but I can’t use gmail for this project).

I’m getting the following error:

Exception while invoking method ‘sendEmail’ AuthError: Invalid login - 535 5.7.0 Mailgun is not loving your login or password

I have set my process.env.MAIL_URL as so:

Meteor.startup(function () {
process.env.MAIL_URL = ‘smtp://postmaster%40login.mailgun.org:password@smtp.mailgun.org:587’;
});

How do I correct this? :anguished:


#2

Hi, I checked the processing of mails a couple of minutes in another thread. Have a look at: How secure is the password when sending an email?

Also you should check page of npm url describes how to define the URI


#3

You could also try once to change the code line 36 and check not for value 465 but for 587 as you defined at your URI.

If you have a look at WikiPedia SMTP there are now two PORT for SMTPS 465 and 587.

@mesosteros : So pretty sure, that this could solve your problem. Please leav a feedback, I would send an PR to meteor if that works.


#4

The error was more embarrassing: I was using my mailgun account username and password instead of the domain’s.
Still, now I don’t get any errors but email is not received, even in the deployed version.


#5

@mesosteros : have you checked to change the source line to port 587 once ?