Unable to send email from web app

ThankYouGift 96 Reputation points
2020-10-05T17:15:46.617+00:00

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

Exchange Exchange Server Management
0 comments No comments
{count} votes

Accepted answer
  1. ThankYouGift 96 Reputation points
    2020-10-05T19:44:07.957+00:00

    That is similar to what they told me but the other way around lol

    Anyways for the future people working through this I changed host value to

    host: "smtpout.secureserver.net"

    I am not sure if this is still supported or if it is mentioned in their docs somewhere, but I found it on an old post and this has my email going through.

    Good luck

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2020-10-05T18:47:58.6+00:00

    GoDaddy use their own flavor of Office 365 services, so best talk with their support directly.

    1 person found this answer helpful.
    0 comments No comments

  2. ThankYouGift 96 Reputation points
    2020-10-05T19:49:48.413+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.