Ultimate Sidebar

HTML MailTo Options

104 7

    Overview

    • The HTML mailto is a URI or Uniform Resource Identifier scheme that encodes an email address in a Web browser. When a user clicks a "mailto" link, it initiates a new message in the default email program on the user's computer. The new message is addressed to the exact address that appears in the link. A "mailto" is not an independent HTML tag; instead it is entered in a hyperlink tag as its link value along with the email address.

    Syntax

    • A "mailto" appears as a value of the "href" attribute in the <a> tag. It is followed by a colon and the email address, the anchor text for the link and the closing <a> tag as shown in the example below. If parameters are added, say to insert a subject title or a carbon copy recipient, the first or sole parameter must be preceded by a question mark while additional parameters are marked with the ampersand.

      <a href="/links/?u=mailto:email_address@domain.xxx">Send us feedback!</a>

    Subject

    • The most common parameter added to the "mailto" function is the "subject" parameter. Use this when you want email sent through the "mailto" link to have a particular title, say "Feedback." If you want to use blanks in the value, enter "%20" (without quotes) instead of spaces.

      Example:

      <a href="/links/?u=mailto:someone@domain.xxx?subject="Website%20Feedback">Send feedback here</a>

    Recipients

    • You can enter multiple email addresses in a "mailto" link by separating them with commas. Alternatively, you can designate recipients of carbon copies, blind carbon copies or both.

      Example 1: Multiple recipients

      <a href="/links/?u=mailto:webmaster@site-domain-name.xxx,administrator@site-domain.xxx?subject=Inquiry">Got questions?</a>

      Example 2: Carbon copy (CC) and Blind carbon copy

      <a href="/links/?u=mailto:editor@yourwebsite.xxx?cc=author@yourwebsite.xxx&bcc=snoop@otherdomain.xxx">Contact us</a>

    Message Body

    • If you want the email to have specific text in the message body, use the "body" parameter. To create a new line, insert "%0A" (without quotes) where you want the new line to start. Use two "%0A" to create two blank lines.

      Example:

      <a href="/links/?u=mailto:helpdesk@domain.xxx?Help&body=Hello,%0AI You have received a new message!">Help Desk</a>

Source: ...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.