on-internet
← Community

Can I reliably set the subject and body of an email in a form using mailto:?

Stack Overflow ·

I'd like to use web form to generate an email using mailto:, with the subject and body specified by the user in the form. Is this supported? The subject and body can be specified in a regular hyperlink, like this: mailto:[email protected]?subject=d e&body=f g I'm testing this with Firefox and Outlook and it works fine: Outlook pre-fills the subject and body with d e and f g, as desired. Of course, those spaces should really be URL-encoded: mailto:[email protected]?subject=d%20e&body=f%20g This works, too: spaces appear in Outlook. (How universal is this? Can I assume it will work for 95% of my users who have their ma

Comments

Sign in or sign up to comment and upvote.

No comments yet.