Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Formatting contents of mailto tag

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
levdt
Asked:
levdt
1 Solution
 
webwyzsystemsCommented:
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
 
levdtAuthor Commented:
Thanks a lot for clarifying that.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now