I installed the email package and tried to send a test mail, but it presents me with the following error: AuthError: Invalid login - 535-5.7.8 Username and password are not accepted
I am sure the credentials are correct and the code is the same as: https://github.com/ideaq/meteor-email
/server/init.js
process.env.MAIL_URL="smtp://USERNAME%40gmail.com: PASSWORD@smtp.gmail.com :465/"; console.log(process.env.MAIL_URL); Email.send({ from: " from@gmail.com ", to: " my-email@gmail.com ", subject: "Meteor Can Send Emails via Gmail", text: "test" });
also tried:
// configure email later for validation and sending messages smtp = { username: ' myusername@gmail.com ', password: 'my-pw', server: 'smtp.gmail.com', port: 465 }; process.env.MAIL_URL = 'smtp://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '@' + encodeURIComponent(smtp.server) + ':' + smtp.port;
I cannot find any other information about this issue or how to track it. Who can give me the key?
source share