0

Im using a mailto link that puts some text into the email's body:

<a href="mailto:?Subject=my-subject&Body=Lots-of-text-here">Email</a>

How can I put a working link within the text? If I make a normal link then its printed as plain text (as if you were looking at a text editor).

Evanss
  • 23,390
  • 94
  • 282
  • 505
  • 1
    Don't expect miracles from a hack. Not everyone has html-enabled mailers as well. And if you could embed links into an email like this, what's to stop someone from adding in javascript or other crap? Be happy that you can even do some basic text insertion. – Marc B Oct 21 '14 at 15:00
  • I don't know if you can do that. Usually converting plain text into a hyperlink is an operation performed by the e-mail client and will depend on the settings of the client. Some clients default to text-only e-mails, while others may convert to a hyperlink in rich text or html e-mails. In addition, the recipient would also have to have more than plaint text e-mails turned on. Some disable rich content in e-mails to save on Data plans for mobile. – xDaevax Oct 21 '14 at 15:00
  • You have to make sure that the mail being sent is sent in HTML format and not text. – Pierre Oct 21 '14 at 15:01

1 Answers1

0

You just can't use HTML in the mailto: function.

One other way to put a working link : use the PHP function mail() and write your link in html.

Magicprog.fr
  • 4,072
  • 4
  • 26
  • 35
  • The mail function doesn't generate a hyperlink, it sends the e-mail message over SMTP. It bypasses the e-mail client that `mailto:` uses completely. – xDaevax Oct 21 '14 at 15:02