Mike Braca <mb(_at_)ebt(_dot_)com> writes:
Hmmm, I just found out that Netscape is sending the headers through as a
query, with '?'. I dislike that also, but not as much as '#'. At least
'?' has a history of being mangled.
mailto:mb(_at_)ebt(_dot_)com?SUBJECT=foo;CC=bar
Following is what Netscape does today. Its similar in spirit to the
proposal which started this discussion with the following differences:
o covers more headers.
o Parses mailbox instead of addr-spec, so one could specify
full names in addition to bare addresses.
o Multiple addresses are allowed.
o There's no mechanism to specify body. Although, it'd be nice to
be able to do that.
Quote from an internal email from a colleague:
The syntax goes something like
URL := 'mailto:' [ ADDRS ] [ HEADERS ]
ADDRS := [ ADDR [ ',' ADDR ]* ]
ADDR := <RFC822 address, hex-encoded if necessary>
HEADERS := '?' HNAME '=' HVALUE [ '&' HNAME '=' HVALUE ]
HNAME := <a mail header name; currently we only support those
headers which you can edit in a mail composition window,
but it would be sensible to allow other headers as well
(with an exclusion list of "dangerous" headers.)>
HVALUE := <contents of the header, hex-encoded if necessary>
This allows a URL to initialize the contents of a mail composition
window; for example, you could put a URL in a document like
<A
HREF="mailto:jwz(_at_)netscape(_dot_)com?subject=cool%20page%21&cc=someone(_at_)elsewhere(_dot_)com">
and when the user clicked on it, there would be a default subject
waiting for them.
We also support this syntax when using a mailto as the POST address
of a form submission; but in that case, we allow all headers, even
unknown ones, to be generated, except for "dangerous" headers.
These are the headers that form submissions cannot set or override
the default values of:
Apparently-To
BCC
Content-Encoding
Content-Transfer-Encoding
Content-Type
Date
Distribution
FCC
Followup-To
From
MIME-Version
Message-ID
Newsgroups
Organization
Reply-To
Sender
X-Mozilla-Status
X-UIDL
XRef
For example, to have a form which sent mail with a different
subject, and some unknown header, one could do this:
<FORM METHOD=POST
ENCTYPE=text/plain
ACTION="mailto:no-such-address?Subject=neato&X-Random-Header=yow">
<INPUT TYPE=TEXT NAME=disposition VALUE="hey, cool">
<INPUT TYPE=submit VALUE="Send Mail">
</FORM>
--
Prabhat Keni.