Make WordPress Core

Opened 16 years ago

Closed 16 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:

Description

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 );

to

$from_email = trim( $content );

Change History (1)

#1 @ryan
16 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.