我试图在我的 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/