javascript - 在html5网页中附加电子邮件中的文件

标签 javascript html email

我正在使用以下代码在 html 网络应用程序中附加文件,但它不起作用

 <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/14228703/

相关文章:

javascript - 在nodejs中使用一些同步代码是否可以

javascript - Redux Saga navigator.geolocation.getCurrentPosition

javascript - 单击时切换视频静音

python - 我不能在 EMAIL_PASSWORD 中使用 Unicode 字符和 django

email - 为站点提要中的新帖子生成电子邮件提醒

javascript - div css onclick更改多个图像

javascript - jQuery:为什么我的脚本无法删除该类?

jquery - jQuery 中的内容 slider 推子

javascript - 在单独的工作表中将 HTML 表格导出到 Excel (.xls)

php - 如何修复 Laravel 5.7 中的 "Class signed does not exist"错误?