Solved

Formatting contents of mailto tag

Posted on 2009-04-07
2
229 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now