node.js - 如何在nodejs邮件程序emailJS中设置回复?

标签 node.js email

我试图在我的 Node 应用程序中使用库 emailjs 发送邮件。一切正常,只是我无法弄清楚如何设置“回复” code>' 配置中的属性。这是我的代码

var email1   = require(node_path + "emailjs/email");

var server1  = email1.server.connect(mail_sever_conf);


//prepare the message
var msg1 = {
        from : '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e08d9986928f8d8d81898ca0878d81898cce838f8d" rel="noreferrer noopener nofollow">[email protected]</a>',
        to:'<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c0b4afada1a9aca9a480a7ada1a9aceea3afad" rel="noreferrer noopener nofollow">[email protected]</a>',
        subject: 'My App mail subject',
        text : 'Some mail content',
        replyTo : '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="96f8f9e2fff0fff5f7e2fff9f8d6fbeff7e6e6b8f5f9fb" rel="noreferrer noopener nofollow">[email protected]</a>' //This is what I tried
        };          


        //send the email
        server1.send(msg1, function(err, message) { console.log(err || message); });

我不知道如何在他们的 github page 中设置它或者,有人可以帮助我吗?

最佳答案

尝试使用这个:

reply-to

https://github.com/eleith/emailjs/blob/master/smtp/message.js 线路:93

它们只是作为标题传递。所以它应该可以工作。


此问题已在项目提出的问题中得到解决/评论:https://github.com/eleith/emailjs/issues/54

关于node.js - 如何在nodejs邮件程序emailJS中设置回复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33889311/

相关文章:

c - 获取文本主体C

regex - 为什么正则表达式匹配在 nodejs 中返回的值比正常值多?

node.js - Nodejs,将 bin 文件作为 BYTEA 存储到 pgsql 中(损坏的文件)

javascript - 在 nodejs 中测试 URL 查询字符串

java - Amazon SES - 无法创建 SMTP 用户

python - 如何在不破坏原始格式的情况下将文本添加到我使用 python/outlook 转发的电子邮件中?

javascript - 如果你用 express js 重载同一条路线会发生什么?

node.js express.js 根路由重定向到//

android - 如何使android电子邮件客户端在屏幕上弹出而不是离开屏幕

PHP Mail 表单不在 Linux 服务器上发送电子邮件