I have a meteor app that is using the email and passwords packages to handle basic password reset functionality.
On my local machine I set the MAIL_URL
env variable to:
smtps://{user}:{password}@smtp.gmail.com:465
and after some fiddling with the associated gmail account (I had to allow less secure applications) it worked.
My live environment is heroku, so I set the env variable there using:
heroku config:set MAIL_URL=smtps://{user}:{password}@smtp.gmail.com:465
and then confirmed that it was set using heroku config
. But for some reason when I try to reset the password on my production environment, it throws the following error:
Exception while invoking method 'forgotPassword' Error: Invalid login: 534-5.7.14
I even did a heroku restart
to be absolutely sure that the env variable was picked up and I still get the error. What's odd is that this is the same error I was getting before I enabled "Less secure apps".
Can anyone see why this might happen? Suggestions as to how I might fix it?