WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12851 closed defect (bug) (fixed)

Change $from_name when sending out email with MS

Reported by: bloggus Owned by:
Milestone: 3.0 Priority: high
Severity: normal Version:
Component: Multisite Keywords:
Focuses: Cc:

Description

For MS setup, set $from_name to the site_name

In pluggable.php

Change:
$from_name = 'WordPress';

To:
$from_name = get_site_option( "site_name" ) == ? 'WordPress' : esc_html( get_site_option( "site_name" ) );

Change History (6)

comment:1 nacin4 years ago

We should attach an MS filter to wp_mail_from_name. Surprised we don't already have that. We do have it for the email address itself:

In ms-default-filters:

add_filter( 'wp_mail_from', 'wordpressmu_wp_mail_from' );

In ms-functions:

function wordpressmu_wp_mail_from( $email ) {
	if ( strpos( $email, 'wordpress@' ) !== false )
		$email = get_option( 'admin_email' );
	return $email;
}

comment:2 follow-up: bloggus4 years ago

It is right for all sent mail except for forgotten password, where I saw this.

comment:3 bloggus4 years ago

By the way, the from email is right, only the from_name need to be changed.

comment:5 in reply to: ↑ 2 uglyrobot4 years ago

  • Type changed from enhancement to defect (bug)

Replying to bloggus:

It is right for all sent mail except for forgotten password, where I saw this.

Confirmed

comment:6 ocean904 years ago

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

This should be fixed in trunk.

Note: See TracTickets for help on using tickets.