I currently have a mailto: link on my website so the user can email myself, however what I am trying to work out is how I can add compulsory text to the email they send me. To clarify I want a sentence to load inside the email when they click the mailto: link.
Thanks
the html code for the mailto: link is below
<div align="center"><a href="mailto:interns@cambridgedesign.company"><img src="mailimage.png" width="75" height="75"/></a></div>
<a href="mailto:someone@example.com?subject=This%20is%20the%20subject&cc=someone_else@example.com&body=This%20is%20the%20body">Send email</a>
As you can see in addition to the To address, we can easily specify:
The latest RFC for the same can be found here: http://tools.ietf.org/html/rfc6068 . The Wikipedia article for mailto
is also detailed.
Make sure you URL encode any text you add to the body and subject.
An online text to URL encoder can be found here.
<div align="center"><a href="mailto:interns@cambridgedesign.company?body=yourtext"><img src="mailimage.png" width="75" height="75"/></a></div>
Added body parameter to the href. ?body=yourtext
Add Body parameter to your mailto url:
<div align="center"><a href="mailto:interns@cambridgedesign.company?subject=Your_Subject&body=Your_Body_Text"><img src="mailimage.png" width="75" height="75"/></a></div>
This Tool is useful for making Email Link: http://angrytools.com/email/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.