Search code examples
javascripthtmlmailto

mailto potential - what can i do with it?


Is it possible to embed html in a message body generated by a mailto link? And/or embed pictures or JavaScript as well? If yes, can you provide an example (it doesn't need to be encoded)?

Also, which other things can I do and which important things can't I do?


Solution

  • Yes, you can!

    mailto:[email protected][email protected]&bcc=ccc&subject=test&body=%3Cb%3Etest%3C%2Fb%3E
    

    You can post a lot in the body, you just have to escape tags with html entities, like > < ". And I believe there is a URL length limit.

    Oh, and don't forget to urlencode at the end!