Reputation: 4852
I need to pass URL to the body part of the mailto link. Sample URL :
www.test.com?param1=value1¶m2={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?
Upvotes: 0
Views: 1713
Reputation: 11
Try this bit of code:
<a href="mailto:?subject=this is a subject&body=[sub]" onclick="this.href =this.href.replace('[sub]',window.location)">Send Mail</a>' with current webpage (offline mode will send file location on disk).
Upvotes: 1
Reputation: 114377
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.
Upvotes: 0