标签:function nod else code template not found htm OLE mes
var nodemailer = require("nodemailer") var template = require("art-template") var fs = require("fs") var data = require("./data") const transporter = nodemailer.createTransport({ host: ‘smtp.163.com‘, port: 465, auth: { user: ‘******@163.com‘, pass: ‘******‘ } }); var sendmail = function () { var html = template(__dirname + ‘/template/index.html‘, data) var option = { from: "*****@163.com", to: "******@163.com", subject: "test", html: html } transporter.sendMail(option, function (error, response) { if (error) { console.log("fail:" + error); } else { console.log("success:" + response.messageId); } }) } sendmail()
nodemailer + art-template template not found
标签:function nod else code template not found htm OLE mes
原文地址:https://www.cnblogs.com/family-626-77/p/12186075.html