Created
September 15, 2013 06:42
-
-
Save shiny/6568530 to your computer and use it in GitHub Desktop.
send email via smtp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodemailer = require "nodemailer" | |
transportOptions = | |
service: "QQ" | |
auth: | |
user: "[email protected]" | |
pass: "password" | |
mailOptions = | |
from: "[email protected]", | |
to: "[email protected]", | |
subject: "测试邮件", | |
text: "测试内容" | |
transport = nodemailer.createTransport "SMTP", transportOptions | |
transport.sendMail mailOptions, (err, res)-> | |
console.log err | |
console.log res | |
transport.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment