nodemailer

使用nodemailer发送邮件

月盾
var nodemailer = require("nodemailer"); var transporter = nodemailer.createTransport({ service: "gmail", auth: { user: "youname@gmail.com", pass: "password" } }); transporter.sendMail({ from: "youname@gmail.com", to: "username@qq.com", subject: "hello", text: "hello world!" }); 这是一个最基本的邮件发送程序,邮件服务商有以下: “1und1” “AOL” “DebugMail.io” “DynectEmail” “FastMail” “GandiMail” “Gmail” “Godaddy” “GodaddyAsia” “GodaddyEurope” “hot.ee” “Hotmail” “iCloud” “mail.ee” “Mail.ru” “Mailgun” “Mailjet” “Mandrill” “Naver” “Postmark” “QQ” “QQex” “SendCloud” “SendGrid” “SES” “Sparkpost” “Yahoo” “Yandex” “Zoho”