0

Possible Duplicate:
Is it possible to add an HTML link in the body of a MAILTO link

I need to insert the below text in the body part of mailto tag.

There is no problem in first line. But second line is link back to my site homepage.

"Inspiration from Author Name: Post title... (include the 3 dots at end of title) View in full at here! [this line is a link back to actual post URL]"

Please help me on this.

Community
  • 1
  • 1
chakkal
  • 9
  • 3
  • And http://stackoverflow.com/questions/247245/is-it-possible-to-add-an-html-link-in-the-body-of-a-mailto-link – j08691 Jan 30 '12 at 19:36

2 Answers2

0

Adding HTML in an email is considered bad practice, you should just put a URL in the body text and let the Email client automatically convert it to a clickable link.

<a href="mailto:emailgoeshere?subject=SUBJECT&body=Check out this URL: http://www.example.com/">some text</a>

You could also try the following (by using HTML-escape codes) to try to force a link with some regular text:

<a href="mailto:emailgoeshere?subject=SUBJECT&body=Check out this URL: &lt;a href='http://www.example.com/'&gt;SOME LINK&lt;/a&gt;">some text</a>

However here's my major disclaimer that this will probably end up looking like crap on most email clients (unless the default/preferred mail format is already set to HTML by the user).

bcmoney
  • 2,889
  • 1
  • 24
  • 30
  • Thanks for answering, i already tried this one. But when user clicks on the mailto link, in the compose email section, it is coming as below: Check out Click here. instead of Click here with the hyperlink. – chakkal Jan 31 '12 at 11:18
  • Is there an example of where you're trying to use this? I think the first option I mentioned is your best bet, and if the user's email client doesn't understand hyperlinks, or, if the user has expressly disabled HTML in their email preferences, you reach a point where you can't really force them to view a clickable link in their email. But certainly the web-based clients like Gmail, Hotmail, Yahoo, etc... and even MS Outlook, Thunderbird, etc... should pick it up as a URL and make it clickable unless the user disabled that functionality. – bcmoney Jan 31 '12 at 16:12
-1

Just use this:

<a href="mailto:emailgoeshere">some text</a>

Using this method will produce a link that creates an email.

Hope this helps you.

Chris Barlow
  • 3,274
  • 4
  • 31
  • 52
randytan
  • 1,029
  • 5
  • 23
  • 52