nodemailer / nodemailer

✉️ Send e-mails with Node.JS – easy as cake!
http://nodemailer.com/
Other
16.67k stars 1.37k forks source link

A working example of Nodemailer with Yahoo Mail? #1242

Closed theabbie closed 3 years ago

theabbie commented 3 years ago

I can't find a working example of using Yahoo mail with Nodemailer, neither is there any documentation for Yahoo, Can someone provide me with a working example of Yahoo with Nodemailer?

I tried this one but it doesn't work.

Fary-dev commented 1 year ago

this work 100%

Supported services

"126" "163" "1und1" "AOL" "DebugMail" "DynectEmail" "FastMail" "GandiMail" "Gmail" "Godaddy" "GodaddyAsia" "GodaddyEurope" "hot.ee" "Hotmail" "iCloud" "mail.ee" "Mail.ru" "Maildev" "Mailgun" "Mailjet" "Mailosaur" "Mandrill" "Naver" "OpenMailBox" "Outlook365" "Postmark" "QQ" "QQex" "SendCloud" "SendGrid" "SendinBlue" "SendPulse" "SES" "SES-US-EAST-1" "SES-US-WEST-2" "SES-EU-WEST-1" "Sparkpost" "Yahoo" <-------- "Yandex" "Zoho" "qiye.aliyun"

---------------------------- example for use yahoo servise ---------------------

you must also create App password in your Yahoo account : https://login.yahoo.com/account/security

async function reset(req) { let testAccount = await nodemailer.createTestAccount(); var transporter = nodemailer.createTransport({ service: 'Yahoo', secure: false, auth: { user: 'your email', pass: 'your password', }, });

var mailOptions = {
    from: 'your email',
    to: 'user email',
    subject: 'Resset password',
    html: `<h3>Hey there! </h3><br> 
    <p>This is your Code: <h4><b>${req.vpassword}</b></h4></p>`,
};

transporter.sendMail(mailOptions, function(error, info) {
    if (error) {
        console.log(error);
    } else {
        console.log('Email sent: ' + info.response);
    }
});

}