Support » Fixing WordPress » How to change 'from: wordpress' for user registration emails?

  • Hi Guys,

    The title pretty much says it all.

    I’ve just setup a user registration system for content on my site and I don’t want my emails to be from ‘WordPress’.

    Is there a way to set it as my blog name?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • you could use a plugin, for instance: http://wordpress.org/extend/plugins/new-user-email-set-up/
    (i do not use any myself)

    or, you could put some code like this into functions.php of your theme:

    //notification mail email and name change
    
    add_filter('wp_mail_from','custom_email_from');
    
    function custom_email_from($mail) {
    // use the original admin email for notifications; adjust the number for different user id
    $user_info = get_userdata(1);
    $email = $user_info->user_email;
    if($email) $mail = $email;
    return $mail;
    }
    
    add_filter('wp_mail_from_name','custom_email_from_name');
    
    function custom_email_from_name($name) {
    // set a custom name for notifications
    $name = 'put your name here';
    return $name;
    }

    http://codex.wordpress.org/Plugin_API/Filter_Reference

    Thanks alchymyth,

    I’ll try the code to keep the resources down!

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to change 'from: wordpress' for user registration emails?’ is closed to new replies.