This question already has an answer here:
- mailto link with HTML body 10 answers
I have not had to mess with mailto links much. However I now need to add a link in the body of a mailto if it is possible.
Is there a way to add a link or to change the email opened to an html email vs a text email?
Something like:
<a href="mailto:test@test.test?body=The message's first paragraph.%0A%0aSecond paragraph.%0A%0AThird Paragraph.%0A%0ALink goes here">Link text goes here</a>
Here's what I put together. It works on the select mobile device I needed it for, but I'm not sure how universal the solution is
It isn't possible as far as I can tell, since a link needs HTML, and mailto links don't create an HTML email.
This is probably for security as you could add javascript or iframes to this link and the email client might open up the end user for vulnerabilities.
The specification for 'mailto' body says:
https://tools.ietf.org/html/rfc5322#section-2.3
Generally nowadays most email clients are good at autolinking, but not all do, due to security concerns. You can likely find some work-arounds, but it won't necessarily work universally.
Please check below javascript in IE. Don't know if other modern browser will work or not.
I have implement following it working for iOS devices but failed on android devices
Add the full link, with:
to the beginning of a line, and most decent email clients will auto-link it either before sending, or at the other end when receiving.
For really long urls that will likely wrap due to all the parameters, wrap the link in a less than/greater than symbol. This tells the email client not to wrap the url.
e.g.