Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#9086 closed defect (bug) (fixed)

wp_mail() From: is broken if "From: email" in headers

Reported by: donncha's profile donncha Owned by: rboren's profile rboren
Milestone: 2.7.2 Priority: normal
Severity: normal Version: 2.7
Component: General Keywords:
Focuses: Cc:


When using wp_mail() if you pass a header with the text "From: me@…" instead of "From: me <me@…>" the generated "From:" line in the email is incorrect.

It will look like "From: me@… <>" which may confuse some brain dead mail user agents.

Fixing it is easy. Change line 294 of wp-includes/pluggable.php from

$from_name = trim( $content );


$from_email = trim( $content );

Change History (1)

#1 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10541]) If no angle brackets, assume email address. Props donncha. fixes #9086 for trunk

Note: See TracTickets for help on using tickets.