Is there any way to include an HTML template for the mailto()
function body? E.g. I have the next link:
echo "<a href="mailto:[email protected]?subject=subject&body=the%20body>Send email</a>";
and I want to do something like this:
$template = "<h1>Some text</h1><p>More text<p><img src='imageurl' />";
echo "<a href="mailto:[email protected]?subject=subject&body=" . $template . ">Send email</a>";
Of course, the above code is putting the raw HTML into the body. So, how to give format to it? I've found a similar question here, but this is an old one, and the accepted answer doesn't let to give HTML format to the content.
Note: I know that it's not the best way to send mails, but it is just an option to let the user to change the content of the default body, and send it with its own mail account.