How To Change The User Notification Email Address For WordPress

Whenever WordPress’ email notification sends out an email it uses a default name to identify itself as the sender: WordPress.

ScreenHunter 96 Aug. 30 09.52 How To Change The User Notification Email Address For WordPress
But as Craig Grella pointed out in his article in WPMU.org, this can lead to two potential problems:

  1. There is a higher likelihood cloaked emails will end up in the new user’s spam folder, resulting in a delay in his login, a direct call for help, or the logging of a support ticket. Not a great way to start the new user out.
  2. The email is not personalized to your website, community, or company. This is a missed opportunity to further brand your user experience.

So what Craig suggests is to drop the “WordPress” by changing it to something a little more personalized so the email is sent directly using your WordPress admin email. There are 2 ways to do this: one is through the use of a plugin, and the other with manual coding, which is what I’ll be focusing on in this post.

This method only requires editing two lines of code in WordPress’ class_phpmailer.php file (it’s current version is 5.2.1, and it’s included with the current standard version of WordPress). You can find inside the /wp-includes folder.

  • Open the aforementioned file (be sure to save a back up copy to be on the safe side)
  • Scroll down and look for the following lines of code:
/**
* Sets the From email address for the message.
* @var string
*/
public $From = ‘root@localhost’;
/**
* Sets the From name of the message.
* @var string
*/
public $FromName = ’Root User’;
  • Change root@localhost to the email address you want, and Root User to that of your name, your company name, or whatever you like.
  • Save the file and then upload to the wp-includes folder.

And you’re done! Now every time WordPress’ email notification sends out an email, your recipients will see your name in their inbox instead of the default “WordPress” name.

NOTE: There is a downside to using this method however. Subsequent updates by WordPress will likely overwrite this class_phpmailer.php file you just edited so it’s best to keep a copy of it on your PC so that you can just re-upload it once this happens.

Incoming search terms for the article:

Related Posts

How To Create A Triangular Pixelation Effect Using Photoshop

How to Create Subtle Caption Hover Effects

How To Create A Webpage With A Clean Style Portfolio Layout

How to Create a Sparkling Diamond and Gold Text Effect