I have tried all different versions of send email however I have not yet achieved the following:
Javascript (or HTML) button, when pressed, open native mail application with attachment. The attachment is located on the same server as the webpage ex.:
www.something.com
www.something.com/file.pdf
The solution should not include serverside scripting (ASP/PHP) I need a simple snippet to make this happen :) Any help would be greatly appreciated.
There is no standardized way to do this, but some email clients accept:
a href="mailto:[email protected]?attachment=<your filepath>"
where would have to be something like "C://Inetpub/wwwroot/myfile.pdf"
However, it will only attach something from the client's machine. You can't attach a file from the web.
Another option would be to just include a link to the file in the body of your email, or instructions to the user on how to email their attachment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With