Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    This plugin is designed as a drop-in solution to do a specific thing. If you want to change what it does, just edit it.

    I recommend you uninstall Personal Email and use this code as a network-wide snippet or a custom mu-plugin:

    function webnashr_email_from( $from_email ) {
    
    	/* Calculate the default address */
    	$sitename = strtolower( $_SERVER['SERVER_NAME'] );
    
    	if ( 'www.' === substr( $sitename, 0, 4 ) ) {
    		$sitename = substr( $sitename, 4 );
    	}
    
    	/* Check that we don't effect emails not sent with the default address */
    	if ( 'wordpress@' . $sitename === $from_email ) {
    		$from_email = 'your-email-here@example.com';
    	}
    
    	return $from_email;
    }
    
    add_filter( 'wp_mail_from', 'personal_email_from' );
    
    function webnashr_email_from_name( $from_name ) {
    	if ( 'WordPress' === $from_name ) {
    		$from_name = 'Enter custom from name here';
    	}
    	return $from_name;
    }
    
    add_filter( 'wp_mail_from_name', 'personal_email_from_name' );

    Remember to replace your-email-here@example.com with the email address you want emails sent from and Enter custom from name here with the name you want emails sent from.

    Thread Starter WebNashr

    (@webnashr)

    Thank you very much

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multisite’ is closed to new replies.