admin管理员组文章数量:1221376
I am attaching file in html web app using following code but it is not working
<div class="email_pot">
<a href="mailto:[email protected]?subject=Enhanced Push-to-Talk&attachments=["js/data.js","js/data.js"]"></a>
</div>
For attach file i use following procedure as it is given below
{
"toEmail": "ToAddressEmail"
,"toName": "ToAddressName"
,"subject": "SubjectLine"
,"body":"BodyText"
,"bodyHtml":"HTML Body Text"
,"attachments":["AttachmentPath","
AttachmentPath"],"titleColour":"Hex Colour (i.e.FF0000)"
}
I am attaching file in html web app using following code but it is not working
<div class="email_pot">
<a href="mailto:[email protected]?subject=Enhanced Push-to-Talk&attachments=["js/data.js","js/data.js"]"></a>
</div>
For attach file i use following procedure as it is given below
{
"toEmail": "ToAddressEmail"
,"toName": "ToAddressName"
,"subject": "SubjectLine"
,"body":"BodyText"
,"bodyHtml":"HTML Body Text"
,"attachments":["AttachmentPath","
AttachmentPath"],"titleColour":"Hex Colour (i.e.FF0000)"
}
Share
Improve this question
edited Jan 9, 2013 at 5:40
Nilesh patel
1,2142 gold badges15 silver badges38 bronze badges
asked Jan 9, 2013 at 5:18
user1808433user1808433
3,4054 gold badges18 silver badges17 bronze badges
5
- can u clear your question? attach more code. – Nilesh patel Commented Jan 9, 2013 at 5:38
- stackoverflow.com/questions/259622/… – Nilesh patel Commented Jan 9, 2013 at 5:40
- @Nileshpatel i have to use only this simple script not php or .net to send attachment – user1808433 Commented Jan 9, 2013 at 6:38
- I think it's possible in PHP, but in JavaScript... I think not. – Beny Commented Jan 10, 2013 at 10:19
- Possible duplicate of Attach File Through mailto URI – Liam Commented Oct 28, 2016 at 8:24
2 Answers
Reset to default 12So, what's your question? I will assume that you are getting some error when you tried to send the email. I have answered a very similar question before:
According to RFC 2368 you can't add an attachment to a message with the mailto: URL scheme due security reasons:
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.
Whether you can put a file attached to an e-mail depends on the mailer. (but many mailers can't add attachement file from maito:protocol)
I think I was able to put the attachments in some versions of Outlook, perhaps.
本文标签: javascriptAttaching a file in email in html5 web pageStack Overflow
版权声明:本文标题:javascript - Attaching a file in email in html5 web page - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739332478a2158548.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论