[buddypress-trac] [BuddyPress] #3270: Default 'From' address on mails sent from BuddyPress

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Jun 8 01:14:53 UTC 2011

#3270: Default 'From' address on mails sent from BuddyPress
 Reporter:  bojote                               |      Owner:
     Type:  defect                               |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
Component:  Core                                 |  Review
 Keywords:  bp_core_email_from_address_filter,   |    Version:  1.2.8
  wp_mail_from                                   |
 I believe there is a bug in the way Buddypress handles 'From' addresses in
 the bp_core_email_from_address_filter function located in bp-core-
 filters.php. It does not care if a From address was previously set!

 Consider the following:

 wp-includes/pluggable.php contains the code:
 $phpmailer->From = apply_filters( 'wp_mail_from', $from_email );

 The From address used in the PHPMailer will be set to whatever the
 $from_email was set to above. IF $from_email is empty, then WP will
 'create' a From address based on 'sitename' to something like 'wordpress@'
 . domain.com. So far, this is all good and is WP default behavior,
 however, Buddypress introduces the following bug:

 Line 27 on bp-core-filters.php shows that
 bp_core_email_from_address_filter always returns a noreply at www.domain.com
 on ALL CASES! it does NOT take any arguments, so if you have properly set
 a $from_email buddypress will NOT care and it will ALWAYS return
 noreply at www.domain.com as the From email address ignoring ANY addresses
 set. Question is, why not use the $from_email that is being passed as an

Ticket URL: <https://trac.buddypress.org/ticket/3270>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list