About Mailto Links

It is possible to predefine the dummy email subjects and bodies in the mailto: links:

1
2
3
4
5
6
7
let subject = 'Feedback about Your Website!';
let body = `Hi, Aidas!
I checked your website and it looks _____.`;
let mailto_url = `mailto:hello@example.com?` +
`subject=${encodeURIComponent(subject)}&` +
`body=${encodeURIComponent(body)}`;
window.open(mailto_url, '_blank');

Tips and Tricks Programming JavaScript HTML5