Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mailto: subject= and body= support in email clients

Tags:

html

email

mailto

Does anyone know if when sending a html newsletter what kind of support the major email clients have for the subject= and body= parts of the mailto tag?

like image 717
solrevdev Avatar asked Aug 21 '09 08:08

solrevdev


People also ask

How do you mailto with subject and body?

If you want to add a subject to that e-mail add ? subject=<subject> to the mailto tag. For example, the complete tag would look similar to the example below. You can also add body text by adding &body=body to the end of the tag, as shown in the example below.

What does mailto mean in an email?

mailto is a Uniform Resource Identifier (URI) scheme for email addresses. It is used to produce hyperlinks on websites that allow users to send an email to a specific address directly from an HTML document, without having to copy it and entering it into an email client.


1 Answers

The behavior varies by both email client and source application. Here's a likely enough example from my own system, using pjp's link.

<a href="mailto:[email protected]?subject=Hello%20People">Send Mail</a>
  • Mailto link followed within Outlook client successfully fills subject
  • Mailto link followed in IE successfully fills subject for Outlook client
  • Mailto link followed in Firefox fails for same Outlook client (subject text remains part of "TO" field)

I tried the same link in HTML emails read by gmail and Yahoo web clients.

  • Gmail correctly opens a new message with desired subject
  • Yahoo pre-fills the subject, but truncates at the space ("Hello" only)

That much variation on just one computer makes embedded mailto tricky to use. I bet that's why many email newsletters provide a "View as a web page" link in the header.

like image 184
Matthew Glidden Avatar answered Sep 20 '22 05:09

Matthew Glidden