Solved

Formatting contents of mailto tag

Posted on 2009-04-07
2
247 Views
Last Modified: 2012-05-06
I want to include an email address on a web page which can be clicked on thus opening the visitors default email client with the email address pre-filled. I also want to format (using bold, italics tags etc.) the body of the email. I can't use any server side scripts as I am using a CMS which does not allow me access to the server the site is hosed on.

So is there any way of using HTML and/or Javascript to format the body of the email? I can use HTML to have linebreaks in the body of the email (as in the code fragment below) but when I add bold, italics tags etc. it does not seem to work. Any ideas?
<P>Click <A href="mailto:person@mailhost.com?SUBJECT=Centaur%20Telephone%20Directory&amp;body=Dear%20User%0Ablah%0Ablah%0Ablah>here</A>.</P>

Open in new window

0
Comment
Question by:levdt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
webwyzsystems earned 50 total points
ID: 24089306
Sorry - you are out of luck.
The assumption that all email clients will be supporting HTML is weak unfortunately.

Many email clients are setup to expressly ignore html. Also - every email client will render your special characters a little bit differently. For example, Outlook wants to see \n for line breaks, while Mac mail wants to see \r\n.
Setting up a plain text mailto containing: to, cc, subject and body are your best compatibility bets.
0
 

Author Closing Comment

by:levdt
ID: 31567494
Thanks a lot for clarifying that.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question