mailto: subject= and body= support in email clients

痴心易碎 提交于 2019-12-01 04:26:05

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:me@somewhere.com?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.

I imagine they've got quite good support for it. BUT!! But mailto will be used to send and email FROM the client TO me@somewhere.com . 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!