Search code examples
htmlurlmailto

How to pass request URL to mailto body


I need to pass URL to the body part of the mailto link. Sample URL :

www.test.com?param1=value1&param2={value2}

If i pass this URL, it's cut down after the '&'. So, i have tried to encode the URL like below:

www.test.com%3Fparam1%3Dvalue1%26param2%3D%7Bvalue2%7D

It works, but the URL is not readable. How can we achieve this without encoding or showing readable URL in the mail body?


Solution

  • When is doubt, read the specification:

    http://shadow2531.com/opera/testcases/mailto/modern_mailto_uri_scheme.html

    Validator available at the bottom of the page.