Current desktop detection / app access
Dave Cridland
dave at cridland.net
Thu Aug 12 15:19:12 EEST 2004
On Thu Aug 12 10:02:57 2004, Michael Meeks wrote:
> The problem is; I've written a prototype new spec. for that
> (attached),
> but havn't been able to grok the URI format / mangling / syntax for
> the
> mailto: URI - which we need to specify to make it actually useful -
> so
> it's essentially rotting unfinished on my disk.
There is a standard. Simply refer to it. Please don't invent a new
one.
A summary:
Traditional style would mean that one arbitrary 'to' recipient was
encoded directly, as 'mailto:foo at example.com' - any URI unsafe
characters would be URI encoded, although those should only appear on
the local-part, and should also be pretty rare. (I can't recall if
underscores are normal or not.)
Either way, any header fields, plus bcc and body, are encoded like
queries on URIs everywhere else. The funny exception would be the
'to' header, if any, which was placed directly after the scheme.
An example:
mailto:dave at cridland.net?to=foo%40example.com%2C%20bar%40example.net
That says to compose (never send, that should be manual[*]) a message
with three people in the To header.
To, cc, and bcc headers can all take a full name as well, so:
mailto:?to=Dave+Cridland+%3Cdave%40cridland.net%3E
is, I think, a valid mailto URI, albeit unusual. MIME-2 encoding
applies before the URL encoding, by the way.
The only additional thing you're trying to add is the attachment.
IIRC, there is nothing in the specification for this. An
'x-attachment' parameter with a URI would probably work, and have the
failure condition (assuming a proper mailto handler) of inserting an
'X-Attachment' header with the URI(s) present. You might also want
x-body-uri, which'd allow you to supply text/html bodies and other
evils. (via data scheme URIs, if you wanted it inlined.)
Note that multiple parameter values are a little vague - I can't see
anything mentioned in the specification. I assume that you'd do it
via multiple parameters with the same name, thus:
mailto:dave at cridland.net?x-attachment=foo&x-attachment=bar&subject=files
Hope that helps,
Dave.
References:
RFC2368 : http://www.zvon.org/tmRFC/RFC2368/Output/frontpage.html
* : Security Considerations of above:
http://www.zvon.org/tmRFC/RFC2368/Output/chapter7.html
Canonical Text: ftp://ftp.isi.edu/in-notes/rfc2368.txt
More information about the xdg
mailing list