Mailto URL Extensionsmailto URL is both handy and frustrating: handy because it
provides an easy, consistent way to solicit email from your visitors, and
frustrating because you can't control the subject or content of the mail
message.
Well, there is some relief, at least with certain browsers. It turns out
that Netscape Navigator 2.0 and higher supports some undocumented extensions to
the mailto URL that let you set some fields in the message to
be composed.
As a starting point, recall that the normal mailto URL looks like
mailto:person@place.com
Selecting this URL causes some sort of mail composition window to open, with the
to: field set to the desired recipient.
The first extension to this format, which seems to work on most browsers, is to add multiple recipients:
mailto:person@place.com,others@elsewhere.com
Since most browsers place everything after the mailto: in the to:
field, you wind up with a message correctly addresses to multiple recipients.
The next trick, which I've only tried with Netscape, is to set the subject of the message. The magic syntax is:
mailto:person@place.com?subject=this is the subject
One caveat: you can imbed spaces in the subject, but do not quote the subject.
I know this is counter-intuitive, but it works.
Once I realized you could set the subject using this technique, I tried a few other
header fields and discovered you can set both the cc (carbon copy) and bcc (blind carbon copy)
fields the same way. You can put these all in one URL, separating them with an
ampersand ("&"):
mailto:person@place.com?subject=some mail&cc=others@place.com&bcc=me@myserver.com
Keep in mind that this is only known to work with Netscape. To see how your browser handles
these URLs, click on these test cases and check the various fields of the message in the
mail composition window: