如何使用JavaScript mailto在Outlook电子邮件中添加签名? [英] How can I add a signature into an Outlook email with JavaScript mailto?
问题描述
我正在使用JavaScript mailto函数用自定义文本填充电子邮件正文.
I am using JavaScript mailto function to fill an email body with custom text.
我可以在电子邮件中添加文本,但签名不会显示.
I can add text to the email but the signature doesn't show up.
有什么方法可以使用mail-to功能发送带有图像的自定义签名? 还是使用mail-to函数时有什么方法可以在正文中插入HTML图像?
Is there any way to send a custom signature with an image using mail-to function? Or is there any way to insert an HTML image in the body when using the mail-to function?
示例代码:
var message = "text of message";
var mailLInk = "mailto:sam@example.com?subject=subject&body=" + message;
document.location.href = mailLink;
推荐答案
RFC 2368 表示body
字段应采用text/plain
格式,因此您不能使用HTML.
Section 2 of RFC 2368 says that the body
field is supposed to be in text/plain
format, so you can't do HTML.
尽管如此,即使您使用纯文本,某些现代邮件客户端仍然有可能将结果链接呈现为可点击的链接.
However even if you use plain text it's possible that some modern mail clients would render the resulting link as a clickable link anyway, though.
这篇关于如何使用JavaScript mailto在Outlook电子邮件中添加签名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!