Solved

Formatting contents of mailto tag

Posted on 2009-04-07
2
239 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Help with mod_substitute 18 37
simple html dom php accessing table/cell  values 4 40
Navigation Menu Does Not Show on iPad 4 30
CSS - Centering an image 2 23
This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
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)

756 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