Snippets

代码片段收集板

发送邮件edit

日期:

作者: 小胡子哥

var transporter = nodemailer.createTransport({
    service: 'Gmail',
    auth: {
        user: 'barret.china@gmail.com',
        pass: 'password'
    }
});
var mailOptions = {
    from: '小胡子哥<barret.china@gmail.com>',
    to: '小胡子哥<barret.china@gmail.com>',
    subject: 'Snippet到来,赶紧迎接~',
    text: textContent,
    html: htmlConent
};
transporter.sendMail(mailOptions, function(error, info){
    if(error){
        return console.log(error);
    }
    console.log('Message sent: ' + info.response);
});

标签:

loading...

这网速真是弱爆了...客官稍等,评论还在加载~