Questions tagged [mailto]

Mailto is the URI scheme for email addresses. It is used in web pages as a link that opens a new email message to the specified to-address in the user's default email client.

Mailto is the URI scheme that targets the user's client from within the browser. Clicking a mailto link creates a new email message in the user's email client, optionally with to, cc, subject, and body pre-populated.

A mailto link can be inserted into a webpage using a standard link:

  • The simplest mailto link specifying a recipient addresses..

    <a href='mailto:someone@host.com'>Click to email</a>
    
  • Multiple recipients..

    <a href='mailto:nobody@host.com,nowhere@host.com'>Click to email</a>
    
  • Autofill the subject line..

    <a href='mailto:someone@host.com?subject=This%20is%20the%20subject'>Click to email</a>
    
  • Autofill the subject line and specify the email to be CC'd to..

    <a href='mailto:someone@host.com?cc=me@me.com&subject=Testing%20mailto&'>Click to email</a>
    
  • Mailto 3 people, with a BCC and a subject..

    <a href='mailto:someone@yoursite.com?cc=someoneelse@theirsite.com, another@thatsite.com, me@mysite.com&bcc=lastperson@theirsite.com&subject=Big%20News'>Click to email</a>
    
  • Autofill the subject line and body of the email with a linebreak..

    <a href='mailto:someone@host.com?subject=Readme&body=This%20is%20the%20first%20line%0D%0AThis%20is%20the%20second'>Click to email</a>
    
  • Add a reply-to address..

    <a href='mailto:someone@host.com?reply-to=me@me.com'>Click to email</a>
    

Special Character escaping

Within mailto URLs, the characters "?", "=", "&" are reserved.

Special characters that appear in addresses, headers or message contents must be encoded using a "%" followed by a two-digit hex number. See RFC3986 for a exhaustive description of URL encodings.

Space = %20             : = %3A         ] = %5D
Line Break = %0D%0A     ; = %3B         { = %7B
" = %22                 ' = %27         } = %7D
# = %23                 < = %3C         \ = %5C
$ = %24                 > = %3E         | = %7C
% = %25                 / = %2F         = = %3D
^ = %5E                 ? = %3F
& = &amp;               [ = %5B

8-bit characters in mailto URLs are forbidden.

More information

  • RFC 2368, which defines the mailto scheme.
1050 questions
-2
votes
4 answers

Using href=mailto link from an image in Javascript

I made a homepage. If you click anywhere the background needed to be changed, except if you click in to the picture with contact. If you click in that picture with contact, a mail should send for an email-address. Now everything is working, the only…
Koli
  • 141
  • 1
  • 11
-2
votes
0 answers

Mailto with a huge html body content

Hello Im facing a big a problem with mailto ,i cant transmit a big html body with mailto , is There any solution for This problem?
-2
votes
2 answers

Include Timestamp in mailto: subject

I want to include a timestamp in the subject of a mail. I already found out that I have to use javascript for this, I also found a way to include it, but I have trouble displaying the mail adress on the webpage (nothing is displayed). Below is the…
Cyhiraeth
  • 15
  • 6
-2
votes
1 answer

How to copy / clone content of a page in href mailto

when a user clicks on the mailto: link the content of the page should be copied in his e-mail message-field. Where I put the code for that in Wordpress. I am not a coder. So please tell me the necessary steps to accomplish this. Thank you very much
Oliver
  • 1
  • 1
-2
votes
2 answers

PHP Mail To Does Nothing

I have some HTML/PHP code. When I upload it to my site, click the send email button, it just sits there.... Why? HTML
-2
votes
1 answer

can we get a call back by using mailto function in php to hide the button and check mail has been sent?

can we get a call back by using mailto function in php to hide the button and check mail has been sent?? My email button This mailto function opens up native mailbox, so is there any way to receive call back from it? I need to hide this link after…
-2
votes
3 answers

Using mailto (html) opens a tab with chrome

I am working on a website to have it be able to use mailto without typing out the email in the script. here is the function