updated version

Mailto URIs - Compose Form Data

Abstract

This document describes some issues mail clients have with parsing and decoding mailto URIs. It also specifies certain rules that should be followed when parsing. These issues and rules are not specifically covered under any specification, but they need to be addressed somewhere so mail clients have something to follow.

Some of the rules are based on clients that have advanced, user-expected, but undocumented support for parsing duplicate hnames.

Introduction

When a mailto client is passed a mailto URI, the client creates a compose form and uses the information from the URI to fill in the TO, CC, BCC, SUBJECT and BODY fields.

For example, click on the following email link.

mailto link

In your mailto client's compose form, you should get the following results. [9]

To:

Cc:

Bcc:

Subject:

The client accomplishes this by parsing the mailto URI according to certain rules, which are described below.

Parsing a mailto URI into a compose form.

Copying data

Notes & Issues

  1. Should empty BODY hvalues that appear before the first non-empty BODY hvalue really be ignored? Thunderbird does it and M2 looks like it'd do it if multiple body havlues where joined by a newline instead of a comma.
  2. For literal user input, should the exact process of removing escape characters and outside quotes in TO, CC and BCC values be described? M2 and most other clients (including webmails) require properly-escaped values, but Thunderbird allows both. However, Thunderbird deescapes TO and CC address differently (probably due to bugs).
  3. Should + be decoded to a space to handle mailto form submissions? Asked on the list about this. See http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2007-January/009210.html.
  4. Empty TO, CC and BCC hvalues should probably be ignored. It doesn't make sense to keep them. Thunderbird for example ignores them, but M2 does not.
  5. Thunderbird is an example of a client that has a compose form where each address is in its own field. Should it be described how to split the addresses into separate fields? Address are separated by a comma and a space, so it's probably obvious, but some specifics maybe?
  6. Mozilla "Copy E-mail address" Bug.
  7. Mozilla BCC decoding bug.
  8. Existing bugs aside, Opera's M2 and Thunderbird's behavior are only focused on because they have more complete parsing support (or attempted support) for duplicate hnames. Most of the parsing support specified here has never been attempted by other clients.
  9. In Thunderbird, each address is in its own field instead of a comma-separated list in one field.
  10. The last subject hvalue should be used even if it's empty and even if there is a previous one that is not empty.

Mail clients

References

Contact