WordPress.org

Ready to get started?Download WordPress

Forums

New Blog Defaults
Email From Name - unintended consequences (3 posts)

  1. Bill Dennen
    Member
    Posted 2 years ago #

    Hi,

    WPMU New Blog Defaults has some bonus features that affect the way email is sent from WordPress. Specifically, you can change the default FROM ADDRESS and FROM NAME with New Blog Defaults.

    If you do not set a FROM NAME in New Blog Defaults, the plugin will automatically use your blog domain name as the FROM NAME in emails.

    While this may be a reasonable thing to do, it's not possible to change this -- at least not using the popular Gravity Forms or WP Mail SMTP plugins. Those plugins allow you to set the FROM NAME for emails, but New Blog Defaults seems to supersede them.

    I suspect this has to do with this function in New Blog Defaults:

    function cets_nbd_from_name($from_name)
    {
    	$options = get_site_option('cets_blog_defaults_options');
    	if (isset($options['from_email_name']) and strlen($options['from_email_name']) > 0) {
    	return $options['from_email_name'];
    
    	}
    	else {
    	global $current_site;
    	return $current_site->domain;
    	}
    }

    I think this basically says "use what we've set in New Blog Defaults, if it's set; otherwise, use the site's domain instead."

    This seems to override everything else.

    http://wordpress.org/extend/plugins/wpmu-new-blog-defaults/

  2. Bill Dennen
    Member
    Posted 2 years ago #

    I wonder if it would be better to change that function to just return the $from_name, like this:

    function cets_nbd_from_name($from_name)
    {
            $options = get_site_option('cets_blog_defaults_options');
            if (isset($options['from_email_name']) and strlen($options['from_email_name']) > 0) {
            return $options['from_email_name'];
    
            }
            else {
            return $from_name;
            }
    }
  3. alittlebitofnothing
    Member
    Posted 2 years ago #

    I found this same function conflicted with WP recaptcha form on all subsites, so for now I have just removed the function along with the helper. Removing the global variable alone didn't do the trick.

    This is a bonus feature that I'd never used and probably never will ... unlike the other settings which I could not live without ...

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic