html/Mailto question

Is there some way to make the mailto tag automatically add a subject line of my choice when someone clicks that link. For Example: Joe Schmoe comes to my web site and clicks the “Email me” button and an E-mail window pops up with my E-mail address and the subject line already filled out?

sorry if this can be found with a web search, I looked, but found it had to sort out.

a href=mailto:bob@bob.com?subject=Hi bob

there you go!

If you want spaces in the subject you should properly HTML-escape them just to ensure browser compatibility.

Thus:

<a href="mailto:bob@bob.com?subject=Hi%20Bob">

Also note that not all browsers/email clients support the ?subject= syntax.

you can even create a pre-typed body affixing &body=

requiring the user to click only the send button, with the whole email pre-typed…

e.g. <a href="mailto:bob@bob.com?subject=Hi%20Bob&body=type%20preset%20text%20here>click here</a>

use escape characters for slashes, spaces etc.

note that different email clients may read the same links differently…