• Hi,

    When a new user registers in my website, he is receiving emails from [email protected]. Also, the name of the sender is shown as “wordpress”.

    How to change the email address and send name.

    Thanks for your kind help,

    Regards,
    Yourgoal

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,
    There are two ways of doing this. Either by a plugin, or hard coding in functions.php
    1. WP Mail SMTP: This plugin is based on phpmailer by worxware. So, you need to edit class_phpmailer.php and have to set new values for FROM (Email Address and Sender Name)

    public $From = '[email protected]';
    public $FromName = 'Your Goad';

    2. Hard Coding: You need to make change in your wordpress theme function file by adding this code snippet. btw, I use this function often (means, every theme I develop a new theme)

    /*
     *   User Registration Notification function
     */
    if ( !function_exists('rxtheme_user notification') ) {
        function rxtheme_user_notification( $user_id, $plaintext_pass = '' ) {
            $user = new WP_User($user_id);
    
            $user_login = stripslashes($user->user_login);
            $user_email = stripslashes($user->user_email);
    
            $message  = sprintf(__('New user registration on your blog %s:'), get_option('blogname')) . "\r\n\r\n";
            $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
            $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";
    
            @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message);
    
            if ( empty($plaintext_pass) )
                return;
    
            $message  = __('Hi there,') . "\r\n\r\n";
            $message .= sprintf(__("Welcome to %s! Here's how to log in:"), get_option('blogname')) . "\r\n\r\n";
            $message .= wp_login_url() . "\r\n";
            $message .= sprintf(__('Username: %s'), $user_login) . "\r\n";
            $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n\r\n";
            $message .= sprintf(__('If you have any problems, please contact me at %s.'), get_option('admin_email')) . "\r\n\r\n";
            $message .= __('Adios!');
    
            wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message);
    
        }
    }

    Thread Starter yourgoal

    (@yourgoal)

    But this issues wasn’t there before.

    I actually installed plugin “newsletter” and later disabled it. After that I am getting this issue.

    Plugin name? Free or Paid?

    Thread Starter yourgoal

    (@yourgoal)

    I strongly suggest you to visit support forum for newsletter plugin. And, start a new thread there.
    This way you’ll find a way to build a better solution.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to change the name "wordpress" in emails sent to users’ is closed to new replies.