mailto: subject= and body= support in email clients

19,180

Solution 1

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.

Solution 2

I imagine they've got quite good support for it. BUT!! But mailto will be used to send and email FROM the client TO [email protected] . Thats definitely not you sending out a newsletter.

You'll have to send emails from the server, potentially in a background process.

EDIT: Slight rethink. Are you talking about you using an admin section with a link with multiple TO addresses that will then open an email client to send out your newsletter? In which case, even though the major browsers probably do have decent support, you shouldn't rely on it out in the wild, since its not in the standard (I think), so they are not required to support it.

EDIT AGAIN:

rfc 2368 info in support of my previous edit

Share:
19,180
Perry
Author by

Perry

I am now a full-time carer but until recently have been head of infrastructure and operations, a full stack software engineer and a devops engineer. With a wealth of technical skills and natural passion for technology I am also Microsoft certified. A lover of C# but not tied to exclusively the Microsoft stack and have enjoyed writing some cloud automation code in both Python and Node.js. Currently, I am a big fan of the .NET Core cross-platform development platform and am taking an interest in Blazor WebAssembly. I write code in Visual Studio Code, Sublime Text and the full Microsoft Visual Studio IDE. I also like to switch between macOS, Windows and Linux for development. I enjoy full stack development, devops and cloud-based work and am enjoying writing front end code in VueJS. Commercially I have worked with the Amazon Web Services stack and using various technologies have thrived in providing start-ups with a scalable continuous deployment architecture and delivered proof of concept, prototype applications and innovate software solutions.

Updated on June 23, 2022

Comments

  • Perry
    Perry almost 2 years

    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?

  • FireSBurnsmuP
    FireSBurnsmuP about 7 years
    I wonder if support has improved somewhat in the 7 years since this answer... I'll provide any info I find if this has changed since then.