1 Overview and purpose
1.1 Definition of the mailto URI scheme
The mailto: URI scheme is a standardized way to create a link that opens an email composition window in a user’s default mail application. Rather than pointing to a web page, it points to an email action. The address that follows the scheme identifies one or more intended recipients.
1.2 Role in email composition
A mailto: link is often used to simplify contact initiation. When activated, it can start a new message with the destination field already filled in, and it may also prepopulate other message fields such as subject or body text. This reduces the amount of typing needed and makes email contact more immediate.
1.3 Relationship to URI and URL standards
mailto: belongs to the broader family of uniform resource identifiers, which provide a general syntax for naming resources and actions. In common usage it may be referred to as a URL, but its function is more accurately described as an email-oriented URI. Its syntax is defined so that different software systems can interpret it consistently.
2 Syntax
2.1 Basic structure
A basic mailto: link begins with the scheme name, followed by a recipient address. The simplest form is mailto:user@example.com. Additional information can be appended using query-style parameters after a question mark.
2.2 Recipient specification
The address portion may contain a single email address or multiple addresses separated by commas. These recipients are inserted into the message destination field when the link is opened. In many implementations, the structure must still conform to standard email address formatting.
2.3 Query parameters
Optional parameters may be added to define message details. These parameters commonly use familiar field names from email headers, such as subject, body, cc, and bcc. They allow limited control over the initial draft without sending any content automatically.
2.3.1 subject parameter
The subject parameter supplies a default subject line for the new email. It is useful when a sender wants to indicate a topic in advance, such as a support request or product inquiry. The text is usually displayed in the subject field of the compose window.
2.3.2 body parameter
The body parameter inserts draft text into the message body. This can provide a greeting, template, or prompt for the sender to complete. Although convenient, it does not guarantee that the content will appear exactly the same in every email client.
2.3.3 cc and bcc parameters
The cc parameter adds recipients to the carbon copy field, while bcc adds recipients to the blind carbon copy field. These fields allow messages to be shared with additional recipients in different ways. Support for these parameters is common, though exact behavior may vary by client.
2.4 Percent-encoding and character handling
Because mailto: links may contain spaces, punctuation, and non-ASCII characters, such content is typically percent-encoded. Encoding ensures that reserved characters are interpreted correctly within the URI. This is especially important for subject lines, body text, and addresses containing special symbols.
3 Supported features
3.1 Multiple recipients
A mailto: link can target more than one recipient at once. This is helpful when a message is intended for a shared inbox or a group of contacts. The recipient list is usually separated by commas in the URI.
3.2 Prefilled message content
One of the main features of mailto: is the ability to prefill message details. Subject lines, body text, and copy fields can be supplied before the user begins writing. This makes it useful for contact forms that redirect to an email client.
3.3 Email client integration
mailto: depends on local email software or a system-configured mail handler. When the user activates the link, the operating system or browser delegates the action to the relevant application. The result is typically a compose window rather than an immediate outgoing message.
3.4 Browser handling behavior
Different browsers may handle mailto: links in slightly different ways. Some open a configured desktop mail program, while others may prompt the user to choose a handler. If no mail application is available, the link may not function as intended.
4 Usage examples
4.1 Simple mailto links
A minimal example is mailto:info@example.com. This opens a new email draft addressed to the specified recipient. Such links are commonly placed on contact pages or in signatures.
4.2 Links with subject and body
A more detailed link can include both subject and body text, such as mailto:info@example.com?subject=Question&body=Hello. This produces a draft with prewritten fields. It is often used to guide users toward a structured inquiry.
4.3 Links with carbon copy fields
A link may also include copy recipients, for example by adding cc= or bcc= parameters. This can direct a message to the primary recipient while notifying additional addresses. It is often used in organizational communication.
4.4 Links with encoded characters
When a subject or body includes spaces or symbols, encoding is required. For instance, spaces are commonly represented with %20. Proper encoding helps preserve the intended text when the link is processed by software.
5 Implementation details
5.1 HTML anchor usage
On web pages, mailto: links are usually created with the anchor element. The link text may read “Email us” or display an address directly. This makes the email action accessible without exposing more complex interface controls.
5.2 Software and browser support
Support for mailto: is broad across major browsers and email clients, though the exact experience depends on local configuration. Some systems route the link to a desktop application, while others rely on web-based mail handlers. Compatibility is generally strong, but not perfectly uniform.
5.3 Client-side processing
The composition draft is assembled on the user’s device after the link is activated. The browser does not send the message itself; it passes the request to the handler. This client-side model helps keep the interaction simple and familiar.
5.4 Limitations of automatic message generation
mailto: links cannot reliably create complete, fully controlled email messages. Message formatting, field interpretation, and character handling can differ between clients. As a result, the feature is best suited to short prefilled drafts rather than complex automation.
6 Practical considerations
6.1 Usability and accessibility
mailto: links can make contact options easier to discover, especially for users who prefer email over forms. Clear link labels improve usability and assist users of screen readers. A descriptive label is often more effective than displaying a raw address alone.
6.2 Security and privacy implications
Publishing email addresses in link form can increase exposure to automated harvesting. In addition, prefilled content may reveal information about intended communication. For privacy reasons, some sites use contact forms or obfuscation techniques instead of direct email links.
6.3 Length and compatibility constraints
Long mailto: URIs can become difficult to manage, especially when they include many recipients or substantial body text. Some clients impose practical limits on length or may truncate unsupported data. Keeping links concise improves reliability across platforms.
6.4 Fallback strategies
When email links are not suitable, websites may offer a contact form or alternative messaging option. This provides a path for users whose devices lack a configured mail client. Fallback methods also help maintain accessibility and functional consistency.
7 Related concepts
7.1 tel URI scheme
The tel scheme is used for telephone numbers and can initiate calling actions on compatible devices. It serves a role similar to mailto: but for voice communication rather than email.
7.2 sms URI scheme
The sms scheme is used to open a text message composition interface. Like mailto:, it can prefill recipient data and sometimes message content. It is commonly supported on mobile devices.
7.3 Web forms and contact pages
Web forms provide an alternative to direct email links by collecting user input in the browser. They can validate fields, reduce address exposure, and route submissions through a server-side system.
7.4 Email protocol terminology
Email communication uses terms such as recipient, subject, cc, and bcc to describe message fields and delivery behavior. These concepts are reflected in the parameters commonly supported by mailto: links.