将HTML代码发送到电子邮件正文应用程序 [英] Send HTML code to Body of email application
问题描述
是否可以使用mailto:
或JavaScript将包含HTML代码的字符串发送到电子邮件正文,以便HTML呈现?这只是呈现为文本,而实际上不显示图像(与mailto:链接相同):
Is there a way I can use mailto:
or JavaScript to send a string containing HTML code to the body of an email message so that the HTML will render? This just renders as text and doesn't actually display an image (same for a mailto: link):
window.open('email@email.com&Subject=Test&Body=<img src="MyImageURL" />');
在真实代码中,我使用图像的完整URL和http://www...
,并且确认电子邮件类型为HTML,而不是纯文本.
In the real code, I'm using the full URL of the image, with the http://www...
, and also, I confirmed that the email type is HTML and not plain text.
这是一个项目要求,允许某人通过自己的电子邮件发送格式化的邮件,而不是我们代表他们通过我们的SMTP服务器在服务器端发送邮件.
This is a project requirement, to allow someone to send a formatted message through their own email rather than us sending it server-side on their behalf through our SMTP server.
推荐答案
否,无法使用javascript或mailto做到这一点.如果您想阅读mailto协议的所有功能,请检查此页面.
no, there is no way to do this using javascript or mailto. if you wanna read all features to mailto protocol please check this page.
这篇关于将HTML代码发送到电子邮件正文应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!