Make WordPress Core

Opened 17 years ago

Closed 11 years ago

#11376 closed feature request (wontfix)

wp_mail should run MsgHTML for HTML emails

Reported by: batmoo Owned by:
Priority: normal Milestone:
Component: Mail Version:
Severity: normal Keywords:
Cc: Focuses:

Description

PHPMailer has a function called ​MsgHTML that sets the email as isHTML and automatically adds HTML and plain text versions of the message to the email.

wp_mail should run this function if $content_type is set to text/html to allow for max compatibility with email clients.

Should note: WordPress doesn't currently send HTML emails so this is more of a benefit for plugins. But if we go down the road for HTML emails with core, this will be useful...

This is a quick fix, so I can patch it up.

Attachments (1)

wp_mail-MsgHTML.diff​ (642 bytes ) - added by batmoo 17 years ago.

Download all attachments as: .zip

Change History (6)

#1 @nacin
17 years ago

  • Component General → Mail
  • Keywords needs-patch 2nd-opinion added
  • Milestone Unassigned → Future Release

If you want to attempt a patch, that'd be good.

That said, since we don't send HTML emails in core, any plugin wishing to override the content type should also be hooking into the action in wp_mail that receives the phpmailer object by reference. So tempting to wontfix this, but I'll move to future release for now.

#2 follow-up: @batmoo
17 years ago

Patch attached, but may as well wontfix this, since the plan text version created by PHPMailer is terrible (e.g. doesn't pull out links from <a> tags), so I'm not sure if it's really worth it.

#3 @batmoo
17 years ago

  • Keywords has-patch added; needs-patch removed

#4 @codebykat
13 years ago

  • Cc kat@… added

#5 in reply to: ↑ 2 @chriscct7
11 years ago

  • Keywords has-patch 2nd-opinion removed
  • Milestone Future Release
  • Resolution → wontfix
  • Status new → closed

Replying to batmoo:

Patch attached, but may as well wontfix this, since the plan text version created by PHPMailer is terrible (e.g. doesn't pull out links from <a> tags), so I'm not sure if it's really worth it.

That still hasn't changed. Closing as wontfix

Note: See TracTickets for help on using tickets.