I have a problem with nodemailer where the user receive the email with sent from my google account which used to authenticate gmail instead of the alias used in mail options.
Below is my code:
var smtpTransport = nodemailer.createTransport({
service: config.mailer.options.service,
auth: {
user: "xxxx@gmail.com",
pass: "password"
}
});
var mailOptions = {
to: user.email,
from: 'Test Email <aaa@aaa.com>',
subject: subject,
html: emailHTML
};
smtpTransport.sendMail(mailOptions); Now when the user receive an email the email mentions that
from: Test Email xxxx@gmail.com
Instead of showing
from: Test Email aaa@aaa.com
Any help please