Attaching a file in email in html5 web page

后端 未结 3 1869
名媛妹妹
名媛妹妹 2020-12-06 19:43

I am attaching file in html web app using following code but it is not working

 
                      
相关标签:
3条回答
  • 2020-12-06 20:22

    i think this code solve your problem.

    <div class="email_pot">
    <a href="mailto:abc@abc.com?subject=my subject&body=see attachment&attachment="+"/my_location_virtual_path/myfile.lis"></a>
    </div>
    
    0 讨论(0)
  • 2020-12-06 20:32

    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.

    0 讨论(0)
  • 2020-12-06 20:33

    So, 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.

    0 讨论(0)
提交回复
热议问题