【发布时间】:2016-03-15 08:53:41
【问题描述】:
每当我尝试使用 nodemailer v1.10 发送带有锚标记的电子邮件时,我的电子邮件中都会混杂一个 3D 字符。我相信这是%3D,解码时代表=。我使用 gmail 作为 SMTP 传输服务。
这是我在 nodemailer 中使用的“html”值
var resetUrl = req.protocol + '://' + req.get('host') + ':' + req.app.get('port') + '/password/reset?token=' + encodeURIComponent(digest);
options.html = 'To reset your password, click this <a href="' + resetUrl + '"><span>link</span></a>.<br>This is a <b>test</b> email.'
这是我在收到的电子邮件中点击“显示原件”时的样子。
To reset your password, click this <a href=3D"http://192.168.1.=
109:3000:3000/password/reset?token=3DoU5J1vm4VTLl0Ru8SMI7x3YvF3Y%3D"><span>=
link</span></a>.<br>This is a <b>test</b> email.
我还注意到每行末尾都有=。这对gmail来说正常吗?我收到的电子邮件在 gmail 中确实显示正常。该链接具有蓝色字体颜色并带有下划线,但当我单击它时它不起作用。我也在雅虎邮箱里试过了,链接也失效了。
【问题讨论】:
标签: javascript node.js email gmail nodemailer