Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12851 closed defect (bug) (fixed)

Change $from_name when sending out email with MS

Reported by: bloggus's profile 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)

#1 @nacin
15 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;
}

#2 follow-up: @bloggus
15 years ago

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

#3 @bloggus
15 years ago

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

#5 in reply to: ↑ 2 @uglyrobot
15 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

#6 @ocean90
15 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.