I have implemented sending messages to 'x' email but it only works locally, when I upload the application made with node to Heroku, it just doesn't work. It gives me the following error:
Error: Invalid login: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv 534-5.7.14 e9HX3y6V25UV6hUh4uM4_rUhqSJ3ujq_xOjNl9kD-IALUNl8WClFdfvFA9ulKc-aFFeOR 534-5.7.14 JG4Zn8OAvx_UrM6eTIKC__q5mC4CvVA2Sk9EfcE6Jjgkede_bb5lehLQUM242Gcs> 534-5.7.14 Please log in via your web browser and then try again. 534-5.7.14 Learn more at 534 5.7.14 https://support.google.com/mail/answer/78754 z4-20020ac84544000000b002f39b99f69esm161549qtn.56 - gsmtp
I have the app deployed at the following address https://multiservicios-espay-dashboard.herokuapp.com/ .In the /auth/register route, it is where the users are created, when a user is created, it sends a confirmation by email. It is right there where the application fails, I want to know why it fails on Heroku but on localhost it works correctly.
It is in Spanish because it is my native language but I would like you to try the creation of users so that they can observe the error that I get. I don't know how to fix it, I would really appreciate your help.
This is my nodemailer config:
const nodemailer = require("nodemailer");
const smtpTransport = require('nodemailer-smtp-transport');
const smtp = smtpTransport({
service: 'gmail',
host: 'smtp.gmail.com',
auth: {
user: 'multiserv.spaky.contacto@gmail.com',
pass: '***********',
}
})
const transport = nodemailer.createTransport(smtp);
module.exports = transport