0

I am trying to send confirmation mail to GMail and Yahoo users in node.js by using nodemailer. I tried this:

nodemailer.createTransport("SMTP",
        {
                 service: 'gmail',
                 auth:
                 {
                        user: "xxx@gmail.com",
                        pass: "xxxx"
                 }
        });
 var message ={

                        from: 'XXX.com',
                        to:xxx@gmail.com,
                        subject: 'Confirm your registration',

              }

It is working fine for Gmail but i want to send Yahoo so i have given yahoo instead of service:Gmail but shows the following error:

Mail from command failed - 553 From address not verified - see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html

How do I send mail to Yahoo?

Mike Christensen
  • 88,082
  • 50
  • 208
  • 326
silvesterprabu
  • 1,417
  • 10
  • 30
  • 46

1 Answers1

3

You don't need to change the service for a different destination. I.e. if you're supplying gmail log-in credentials and sending an email to yahoo, your service is still 'gmail'.

rdrey
  • 9,379
  • 4
  • 40
  • 52