From html-wg-request@w3.org Thu Sep 19 14:30 EDT 1996
Received: from carroll.hprc.utoronto.ca (carroll.hprc.utoronto.ca [128.100.104.40]) by ic-unix.ic.utoronto.ca (8.7.1/8.7.1) with ESMTP id OAA22587 for <igraham@ic-unix.ic.utoronto.ca>; Thu, 19 Sep 1996 14:30:47 -0400 (EDT)
Received: by www19.w3.org (8.6.12/8.6.12) id OAA03853; Thu, 19 Sep 1996 14:31:21 -0400
Resent-Date: Thu, 19 Sep 1996 14:31:21 -0400
Resent-Message-Id: <199609191831.OAA03853@www19.w3.org>
Message-ID: <32419153.42DC@netscape.com>
Date: Thu, 19 Sep 1996 11:30:43 -0700
From: Jamie Zawinski <jwz@netscape.com>
Organization: Netscape Communications Corporation, Mozilla Division
X-Mailer: Mozilla 3.0Gold (X11; U; IRIX 6.2 IP22)
MIME-Version: 1.0
To: html-wg@w3.org
Subject: mailto: and subject (was Re: HTML questions ? (fwd))
References: <01I9B7C903O200430X@SCI.WFBR.EDU> <199609102144.OAA13999@newman>
Resent-From: html-wg@w3.org
X-Mailing-List: <html-wg@w3.org> archive/latest/1163
X-Loop: html-wg@w3.org
Sender: html-wg-request@w3.org
Resent-Sender: html-wg-request@w3.org
Precedence: list
Content-Type: multipart/mixed; boundary="------------5929C6D334E"
Content-Length: 6208
Status: OR

This is a multi-part message in MIME format.

--------------5929C6D334E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I don't intend to get embroiled in a flame war about this, but I thought
some of you might be interested in the history of our extensions to the
syntax of the "mailto:" URL.

Basically, for some internal implementation details of the mail reader,
I needed to be able to pass around data which represented a mail
composition window, including the contents of various header fields
(including to, subject, references, etc.)

The easiest way to pass this information around was inside of a URL
object.

I could have made this functionality inaccessible from HTML, and used 
it only internally, but it seemed potentially useful, so I left it
accessible so that we could experiment with it.

It was never announced anywhere; but at some point, somehow, the
"?subject=" syntax became known.  Maybe someone ran "strings" on the
binary or something; I don't know.

Some time later, someone on the IETF-MHTML mailing list proposed an
extension to mailto: that was essentially equivalent to ours, and at
that point, I wrote up the following document which describes what we 
do today.

My opinion:

 = the functionality that this describes is useful, and it would be nice
   if it, or something functionally equivalent to it, was a part of the
   standard.  I personally don't have the time or inclination to drive
   this effort.  Perhaps someone else would like to.

 = I think the TITLE attribute to the A tag is not nearly as useful.

 = Neither is the "mailserver:" URL.

-- 
Jamie Zawinski    jwz@netscape.com   http://www.netscape.com/people/jwz/

--------------5929C6D334E
Content-Type: text/html; charset=us-ascii; name="mailto.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="mailto.html"
Content-Base: "file:/tmp/mailto.html"

<BASE HREF="file:/tmp/mailto.html">

<TITLE>Syntax of Netscape 2.0 mailto: URLs</TITLE>
<H2 ALIGN=CENTER>Syntax of Netscape 2.0<TT> mailto:</TT> URLs</H2>

<P>Netscape 2.0 and newer support an experimental new syntax in <B>mailto:</B>
URLs.  This is not a part of any standard, and subject to change in the
future, so users of this new syntax should be aware of the portability
problem implicit in it.

<P>The Netscape-specific syntax goes something like this:

<UL><PRE>
 URL     :=  'mailto:' [ ADDRS ] [ HEADERS ]
 ADDRS   :=  [ ADDR [ ',' ADDR ]* ]
 ADDR    :=  <I>&lt;RFC822 `mailbox', hex-encoded if necessary&gt;</I>
 HEADERS :=  '?' HNAME '=' HVALUE [ '&amp;' HNAME '=' HVALUE ]
 HNAME   :=  <I>&lt;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.)&gt;</I>
 HVALUE  :=  <I>&lt;contents of the header, hex-encoded if necessary&gt;</I>
</PRE></UL>

<P>
This allows a URL to initialize the contents of a mail composition 
window; for example, you could put a URL in a document like

<P><UL><PRE>
&lt;A HREF="mailto:jwz@netscape.com?subject=cool%20page%21&amp;cc=someone@elsewhere.com"&gt;
</PRE></UL>

<P>
and when the user clicked on it, there would be a default subject
waiting for them.

<P>
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:

<P><CENTER><TABLE BORDER=0><TR><TD>
<UL TYPE=CIRCLE>
 <LI> Apparently-To
 <LI> BCC
 <LI> Content-Encoding
 <LI> Content-Length
 <LI> Content-Transfer-Encoding
 <LI> Content-Type
 <LI> Date
 <LI> Distribution
 <LI> FCC
 <LI> Followup-To
</UL></TD><TD>
<UL TYPE=CIRCLE>
 <LI> From
 <LI> Lines
 <LI> MIME-Version
 <LI> Message-ID
 <LI> Newsgroups
 <LI> Organization
 <LI> Reply-To
 <LI> Sender
 <LI> X-UIDL
 <LI> XRef
</UL>
</TD><TR></TABLE></CENTER>

For example, to have a form which sent mail with a different
subject, and some unknown header, one could do this:

<P><UL><PRE>
&lt;FORM METHOD=POST 
      ENCTYPE=text/plain
      ACTION="mailto:no-such-address?Subject=neato&amp;X-Random-Header=yow"&gt;
&lt;INPUT TYPE=TEXT NAME=disposition VALUE="hey, cool"&gt;
&lt;INPUT TYPE=submit VALUE="Send Mail"&gt;
&lt;/FORM&gt;
</PRE></UL>

<P>
The drawback to extending mailto: in this way is that it's
not backward-compatible; browsers which only understand the
older syntax (Netscape 1.1 among them) will take all that
junk and dump it in the "to" field, leaving the user with
an illegal mail address which they need to clean up.

<P>
Somewhere there is a proposal floating around to extend
the A tag such that one could do

<P><UL><PRE>
  &lt;A HREF="mailto:jwz" TITLE="subject of the message"&gt;
</PRE></UL>

<P>
but that means you need to pass around HTML to do the job, rather than
simply a URL.  Also, this only handles the case of the subject header;
to handle other fields, one would have to either allow arbitrary stuff
in the <TT>A</TT> tag (obviously a bad idea) or use a format like

<P><UL><PRE>
&lt;A HREF="mailto:jwz" HEADERS="<I>...all the headers, encoded somehow...</I>"&gt;
</PRE></UL>

<P>
That all seemed much more awkward, which is why I did it this way.

<P>
There is currently no mechanism to specify a default <I>body</I> of
the message, though that would be nice; when we add this ability, we
will probably do it by adding a <TT>body=</TT> parameter to the URL
(treating the body as a sort of pseudo-header.)

<P>
Some folks in the IETF-822 and MHTML working groups have suggested that
<B><TT>;</TT></B> would be a better delimiter than the <B><TT>&amp;</TT></B>
that we use today.  Once there is some actual standards-body effort toward
expanding the syntax of the mailto URL in this direction, we will do whatever 
the standard body decides.

<P><TABLE BORDER=0 width="100%"><TR><TD ALIGN=RIGHT>
<HR>
<A HREF="about:jwz">Jamie Zawinski</A><BR>
<A HREF="mailto:jwz@netscape.com?Subject=Re%3A%20mailto%3A%20URLs">
jwz@netscape.com</A><BR></TD></TR></TABLE>

--------------5929C6D334E--


From html-wg-request@w3.org Thu Sep 19 18:00 EDT 1996
Received: from carroll.hprc.utoronto.ca (carroll.hprc.utoronto.ca [128.100.104.40]) by ic-unix.ic.utoronto.ca (8.7.1/8.7.1) with ESMTP id SAA23065 for <igraham@ic-unix.ic.utoronto.ca>; Thu, 19 Sep 1996 18:00:48 -0400 (EDT)
Received: by www19.w3.org (8.6.12/8.6.12) id SAA09813; Thu, 19 Sep 1996 18:01:28 -0400
Resent-Date: Thu, 19 Sep 1996 18:01:28 -0400
Resent-Message-Id: <199609192201.SAA09813@www19.w3.org>
To: MACRIDES@sci.wfbr.edu
CC: html-wg@w3.org
In-reply-to: <01I9O5E0PX4Y006HJI@SCI.WFBR.EDU> (message from Foteos Macrides
	on Thu, 19 Sep 1996 15:20:17 PDT)
Subject: Re: mailto: and subject (was Re: HTML questions ?(fwd))
From: Larry Masinter <masinter@parc.xerox.com>
Message-Id: <96Sep19.143341pdt."2757"@golden.parc.xerox.com>
Date: Thu, 19 Sep 1996 14:33:41 PDT
Resent-From: html-wg@w3.org
X-Mailing-List: <html-wg@w3.org> archive/latest/1168
X-Loop: html-wg@w3.org
Sender: html-wg-request@w3.org
Resent-Sender: html-wg-request@w3.org
Precedence: list
Content-Type: text
Content-Length: 553
Status: OR

The URI working group closed, but the mailing list is still open.
Just because the working group is closed doesn't mean that there are
no prospects for a better situation. A revised 'mailto:' URL could
become a new Proposed Standard with or without a working group.

Personally, I don't see any reason to reject Jamie's proposal, which
has the advantage that it is fully worked out, and is already
implemented and widely deployed. All we really need is an Internet
Draft, someone willing to respond to comments, and a (longer) IESG
'last call'.

Larry


