Make WordPress Core

Opened 15 years ago

Closed 9 years ago

#11376 closed feature request (wontfix)

wp_mail should run MsgHTML for HTML emails

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

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 14 years ago.

Download all attachments as: .zip

Change History (6)

#1 @nacin
14 years ago

  • Component changed from General to Mail
  • Keywords needs-patch 2nd-opinion added
  • Milestone changed from Unassigned to 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
14 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
14 years ago

  • Keywords has-patch added; needs-patch removed

#4 @codebykat
11 years ago

  • Cc kat@… added

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

  • Keywords has-patch 2nd-opinion removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to 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.