0

I am setting up my share options in my php scrip and want to add a mailto: share function. I use the following code to generate the current page url dynamically. How do I encode or include this link in a mailto: body?

<a href="<?php echo JO_Request::getInstance()->getFullUrl(); ?>">

This is what I have tried:

<a href="mailto:?subject=mysubject&amp;body=someofmytextbeforeurl: href="<?php echo JO_Request::getInstance()->getFullUrl(); ?>">mail a friend</a>
ian
  • 303
  • 3
  • 15
  • mailto is for email, not a url. your second link have twice the attribute href... something illegal in HTML. – Zyo Aug 02 '15 at 23:53
  • 1
    possible duplicate of [Is it possible to add an HTML link in the body of a MAILTO link](http://stackoverflow.com/questions/247245/is-it-possible-to-add-an-html-link-in-the-body-of-a-mailto-link) – davcs86 Aug 03 '15 at 00:03

0 Answers0