I have a node service using nodemailer with these configurations:
const mailerConfig = {
host: "smtp.office365.com",
secure: false,
port: 587,
auth: this.email,
}
const info = await transporter.sendMail({
from: '******@thankyougift.io',
to: email,
subject: 'Reset Password: Thank You Gift',
text: password,
html: `<h1>Temp Password</h1><p>${password}</p>`
})
The error message:
Error: Mail command failed: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [SN1PR12CA0052.namprd12.prod.outlook.com]
If I set secure: true I get this error:
Error: 4533812672:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332
My email is distributed through GoDaddy and I am testing this locally.
I have tried all combinations including port: 465 which times out.
I have reset my email password as suggested on some forums.
I double checked the email authentication is correct and successfully used GMAIL to send emails.
I am able to send emails with this account through my computer and phone.
Please help