Tag: 电子邮件模板

蓝鸟 – promisification – promisify所有'email-templates'节点模块 – 发送邮件

我正试图将email-templates节点模块转换为承诺。 我正在使用蓝鸟 promisification,但它不能转换。 var emailTemplates = Promise.promisifyAll(require('email-templates')); Promiseification节点模块是否支持这种转换或者我是否有任何错误? 编辑: 我现在正在做这个,但是要把它转换成蓝鸟的承诺。 var emailTemplates = require('email-templates'); var path = require('path'); var templatesDir = path.resolve(__dirname, '../..', 'assets/templates'); var postmark = require('postmark'); var postmarkKey = MY_POSTMARK_KEY; var postmarkClient = postmark(postmarkKey); module.exports = { sendEmail : function (templateName, locals, callback) { emailTemplates(templatesDir, function (err, template) { if (err) return callback(err, […]

nodemailer node-email-templates,没有这样的文件或目录错误

我想使用电子邮件模板软件包与nodemailer结合使用,但是得到关于模板文件不存在的错误。 我已经尝试了绝对的相对path,都无济于事。 最后,我决定尝试让示例工作,但仍然没有运气。 这是我做的: 下载并解压缩node-email-templates-master的 zip文件,然后: cd node-email-templates-master npm install npm install nodemailer@0.3.27 cd examples/nodemailer node index 我得到了和以前一样的错误: fs.js:338 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^ Error: ENOENT, no such file or directory '../header/html.ejs' at Object.fs.openSync (fs.js:338:18) at fs.readFileSync (fs.js:182:15) at Object.exports.parse (/mypath/node-email-templates-master/node_modules/ejs/lib/ejs.js:159:19) at exports.compile (/mypath/node-email-templates-master/node_modules/ejs/lib/ejs.js:222:15) at Object.exports.render (/mypath/node-email-templates-master/node_modules/ejs/lib/ejs.js:273:10) at EmailTemplate.render (/mypath/node-email-templates-master/lib/main.js:63:16) at Render.batch (/mypath/node-email-templates-master/examples/nodemailer/index.js:118:9) at /mypath/node-email-templates-master/examples/nodemailer/index.js:126:16 […]

使用Linkedin的dust.js作为丰富的电子邮件模板平台

我想用node.js的 nodemailer发送丰富的邮件给用户。 但是我想用的模板引擎是dust-LinkedIn模板引擎。 有没有人有使用dust.js的电子邮件模板的想法,或有一个与nodemailer发送电子邮件的工作教程。 请分享您的观点。

问题与发送通过邮件iOs默认邮件应用程序和outlook图像

我正尝试使用“node-ses”从node.js API发送电子邮件。 我在邮件正文里面添加了图片url代码。 <img src="' + host + '/images/ic_comscope.png" height="40"> 它完全适用于Gmail和浏览器,但在iOs默认邮件应用和outlook方面有问题。 注意:我不想要有关附件的build议给其他解决办法