Email links

翻译不完整。 请帮助我们翻译这篇文章!

这往往是有益的Web站点能够创建链接或按钮,点击后,打开一个新的出站电子邮件。例如,这可能会创造一个“联系我们”按钮时使用。这是使用完成<a> 元素和mailto URL方案。.

Mailto 基础

In its most basic and commonly used form, a mailto link simply indicates the email address of the intended recipient. For example:

<a href="">Send email to nowhere</a>

Complete examples detail:

<a href="
Send mail with cc, bcc, subject and body</a>


This results in a link that looks like this: Send email to nowhere.

In fact, the email address is even optional. If you leave it out (that is, your href is simply "mailto:"), a new outgoing email window will be opened by the user's mail client that has no destination address specified yet. This is often useful as "Share" links that users can click to send an email to an address of their choosing.


In addition to the email address, you can provide other information. In fact, any standard mail header fields can be added to the mailto URL you provide. The most commonly used of these are "subject", "cc", and "body" (which is not a true header field, but allows you to specify a short content message for the new email). Each field and its value is specified as a query term.

Note: The values of each field must be URL-encoded (that is, with non-printing characters and spaces percent-escaped).

样品mailto 网址

Here are a few sample mailto URLs:

Note the use of the ampersand (&) to separate each field in the mailto URL. This is standard URL query notation.


If you'd like to create an outgoing email asking to subscribe to a newsletter, you might use a mailto link like this:

<a href="!%0A%0AFull%20name%3A%0A%0AWhere%20did%20you%20hear%20about%20us%3F">
Subscribe to our newsletter

The resulting link looks like this: Subscribe to our newsletter.