1

Nodemailer works fine when sending to email addresses on multiple different Domains. But when im sending a mail to a gmail adress, Gmail dont receive this mail.

what i have to Change?

const transporter = nodemailer.createTranspor({

      host: 'test.de',
      port: 25,
      secure: false,
      auth: {
        user: 'default.smtp@test.de',
        pass: 'test'
      }
    })
Josef Henn
  • 125
  • 4
  • 18
  • Possible duplicate of https://stackoverflow.com/questions/26196467/sending-email-via-node-js-using-nodemailer-is-not-working/26196619 ? – Xcrowzz Jan 07 '19 at 14:58
  • Gmail is probably thinking your message is spam. What error do you get when sending the email? – molamk Jan 07 '19 at 15:00
  • 1
    i dont get any error. ist just not in the gmail-postbox – Josef Henn Jan 07 '19 at 15:02
  • 1
    you might want to have a look at this github issues thread in the nodemailer repo https://github.com/nodemailer/nodemailer/issues/677 – Andy Ford Jan 08 '20 at 23:14

1 Answers1

0

Try adding a name attribute, this worked for me.

Galdil
  • 499
  • 5
  • 11