• When a new user registers for my site, they receive an email giving them their basic user information. This email seems to be sent from the admin email on the account. I do not want it to come from that email, I would like the email to come from one that i create so that I don’t get a million emails a day for customer support and such. How can i change this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • http://wordpress.org/plugins/search.php?q=better+notifications

    I see this plugin gets good ratings and can do what you want (configure the email to come from some other email address): http://wordpress.org/plugins/wp-better-emails/

    You can change this by overriding the function wp_new_user_notification(). This is what WordPress calls a “pluggable function,” meaning that before WordPress core defines the function, it checks to see whether you have defined your own.

    So, in your functions.php file (or in a plugin file, if you’d like) you can create your own function:

    function wp_new_user_notification($user_id, $plaintext_pass = '') {
         //do stuff here.
    }

    You will want to copy exactly the wp_new_user_notification function found in wp-includes/pluggable.php file. The find the line that reads:

    wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);

    and replace it with these lines:

    $headers = 'From: Blog Name <username@example.com>' . "\r\n"; // fill this in with the e-mail address and from name that you want to use
    wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message, $headers);

    And that will cause the e-mails to come from the address you want.

    Oh, and the plugin bemdesign shared while I was writing my response is a good option, too, if you don’t want to do any coding. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘"Account Created" 'from' email issue’ is closed to new replies.