Opened 4 years ago

Closed 4 years ago

#9086 closed defect (bug) (fixed)

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

Reported by: donncha Owned by: rboren
Priority: normal Milestone: 2.7.2
Component: General Version: 2.7
Severity: normal Keywords:
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)

comment:1   ryan4 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.