Use body template for mailto

Is it possible to include an HTML template for a function body mailto()? For instance. I have the following link:

echo "<a href="mailto:email@gmail.com?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@gmail.com?subject=subject&body=" . $template . ">Send email</a>";

Of course, the code above puts raw HTML in the body. So how to give it a format? I found a similar question here , but this is an old one and the accepted answer does not allow to provide HTML format for the content.

Note. I know that this is not the best way to send letters, but it is just an option that allows the user to change the contents of the body by default and send it using their own email account.

+3
source share
2 answers

, , , html- mailto.
: MailTo HTML:

hname "body" , h . "body" hname / . URL- mailto , , , (, "" ), MIME.

+2
mailto:destination@gmail.com?body=this is the body
0

All Articles