Is it possible to set the subject/content of email when I use mailto:?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
Yes, you can like this:
here is the trick http://neworganizing.com/content/blog/tip-prepopulate-mailto-links-with-subject-body-text
Yes:
Use this to experiment with mailto form elements and link encoding.
You can enter subject, body (i.e. content), etc. into the form, hit the button and see the mailto html link that you can paste into your page.
You can even specify elements that are rarely known and used: cc, bcc, from emails.
Here's a runnable snippet to help you generate mailto: links with optional subject and body.
If you want to add html content to your email, url encode your html code for the message body and include it in your mailto link code, but trouble is you can't set the type of the email from this link from plaintext to html, the client using the link needs their mail client to send html emails by default. In case you want to test here is the code for a simple mailto link, with an image wrapped in a link (angular style urls added for visibility):
The html tags are url encoded.
you can use this code to set subject, body, cc, bcc