我使用以下代码在 html Web 应用程序中附加文件,但它不起作用
<div class="email_pot">
<a href="mailto:eptt@att.com?subject=Enhanced Push-to-Talk&attachments=["js/data.js","js/data.js"]"></a>
</div>
对于附加文件,我使用以下程序,如下所示
{
"toEmail": "ToAddressEmail"
,"toName": "ToAddressName"
,"subject": "SubjectLine"
,"body":"BodyText"
,"bodyHtml":"HTML Body Text"
,"attachments":["AttachmentPath","
AttachmentPath"],"titleColour":"Hex Colour (i.e.FF0000)"
}
最佳答案
那么,您的问题是什么?我假设您在尝试发送电子邮件时遇到了一些错误。我已经回答得很similar question之前:
根据RFC 2368 由于安全原因,您无法使用 mailto: URL 方案向邮件添加附件:
The user agent interpreting a mailto URL SHOULD choose not to create a message if any of the headers are considered dangerous (...) Only the Subject, Keywords, and Body headers are believed to be both safe and useful.
关于javascript - 在 html5 网页中的电子邮件中附加文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45056078/