[html] Mailto: Body formatting

Possible Duplicate:
mailto link multiple body lines

Just a quick question. I am creating a website for a charity and they have a section on the site where people can give some suggestions for how they could raise more money for their cause. Their site is just plain HTML, JS and CSS to keep it light-weight. I added a mailto: that will allow people to send them an e-mail, but they would like some more information like their name and their contact details. I want to know if there is a way to format the body so that there are new lines:

name: 
email:
tel:
postal address:

thank you!

Here is what my mailto looks like now. any help or suggestions are welcome:

<a href="mailto:[email protected]?subject=Suggestions&body=Your%20suggestions%20are%20really%20important%20to%20us%20,thanks!">Send suggestions!</a>

This question is related to html email mailto

The answer is


Forget it; this might work with Outlook or maybe even GMail but you won't be able to get this working properly supporting most other E-mail clients out there (and there's a shitton of 'em).

You're better of using a simple PHP script (check out PHPMailer) or use a hosted solution (Google "email form hosted", "free email form hosting" or something similar)

By the way, you are looking for the term "Percent-encoding" (also called url-encoding and Javascript uses encodeUri/encodeUriComponent (make sure you understand the differences!)). You will need to encode a whole lot more than just newlines.


From the first result on Google:

mailto:[email protected]_t?subject=Header&body=This%20is...%20the%20first%20line%0D%0AThis%20is%20the%20second

Examples related to html

Embed ruby within URL : Middleman Blog Please help me convert this script to a simple image slider Generating a list of pages (not posts) without the index file Why there is this "clear" class before footer? Is it possible to change the content HTML5 alert messages? Getting all files in directory with ajax DevTools failed to load SourceMap: Could not load content for chrome-extension How to set width of mat-table column in angular? How to open a link in new tab using angular? ERROR Error: Uncaught (in promise), Cannot match any routes. URL Segment

Examples related to email

Monitoring the Full Disclosure mailinglist require(vendor/autoload.php): failed to open stream Failed to authenticate on SMTP server error using gmail Expected response code 220 but got code "", with message "" in Laravel How to to send mail using gmail in Laravel? Laravel Mail::send() sending to multiple to or bcc addresses Getting "The remote certificate is invalid according to the validation procedure" when SMTP server has a valid certificate How to validate an e-mail address in swift? PHP mail function doesn't complete sending of e-mail How to validate email id in angularJs using ng-pattern

Examples related to mailto

Insert a line break in mailto body Automatically open default email client and pre-populate content Mailto on submit button Mailto: Body formatting mailto link multiple body lines mailto using javascript mailto link with HTML body Can I set subject/content of email using mailto:? Is it possible to add an HTML link in the body of a MAILTO link