Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4658 closed defect (bug) (worksforme)

wp_mail_from filter doesn't filter all occurances of default wp_mail from address

Reported by: westi's profile westi Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version: 2.2.1
Component: General Keywords:
Focuses: Cc:

Description

Created from #2053 new addition from Otto42:

The pluggable.php contains this code in wp_notify_postauthor():


$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));


This is done because it builds its own headers and sends them to wp_mail. The end result of this is that the wp_mail_from filter is not applied in this case, because $headers != .


Suggest changing the code above in wp_notify_postauthor() to this:


$wp_email = apply_filters('wp_mail_from', "wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])));


In order to apply the same wp_mail_from filter to these email addresses as well.

Change History (2)

#1 @westi
17 years ago

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

This is already fixed on trunk.

All from addresses are now passed through the wp_mail_from filter in wp_mail itself.

#2 @Nazgul
17 years ago

  • Milestone 2.3 (trunk) deleted
Note: See TracTickets for help on using tickets.