How to send mail with a Subject using a Mailto URL?
I need to make a Mailto link
to my website which is suppose to contain either the product name or the product page URL in the subject section
. How can I do it?
Exp: When you get an email through eBay
about a product you are selling or buying, you automatically know what product that email is about by seeing the product name in the subject section.
How can i do this?
<a href="mailto:[email protected]?subject=hello world">Email Me!</a>
Internet Archive:
- Set up an HTML mailto form without a back-end script
- HTML Mailto Attribute and Tips
- HTML Mailto Tips and Tricks
- Mailto Syntax
Related Stackoverflow Questions:
- Avoiding the Mailto Annoyance?
- Best way to obfuscate an e-mail address on a website?
- Effective method to hide email from spam bots
- What are some ways to protect emails on websites from spambots?
I've run into problems with this before when I didn't url encode the value, so I would suggest (using lc's example):
<a href="mailto:[email protected]?subject=This+Is+My+Product">
or
<a href="mailto:[email protected]?subject=This%20Is%20My%20Product">