When you send an email from your WordPress site, the default sender name is set to “WordPress”. In this guide, you will learn how to change the default sender name of outgoing emails.
WordPress sends various outgoing emails to users. For example, when users try to recover their forgotten passwords.
Here, the default sender name of an outgoing email is “WordPress” and the default sender email is “wordpress@domain.com”. It is possible to customize the sender’s name and email of outgoing emails using existing plugins or a custom plugin.
Changing the Sender Name using Existing Plugins
To change the sender email and name of outgoing emails, we can make use of any one of the following plugins:
1. WP Mail SMTP
WP Mail SMTP plugin fixes the deliverability of emails by reconfiguring WordPress to properly use the SMTP provider when sending emails. Using this plugin, you can also change the name of the sender of outgoing emails.
In your WordPress admin, “Plugins” > “Add New Plugin” and search for “WP Mail SMTP”.
Install and activate this plugin. After, you will see a new menu “WP Mail SMTP”. Here, you can change the default “From Email” and “From Name” of outgoing emails.
After entering new values, you can click on “Save Settings” for changes to take effect.
The “WP Mail SMTP” plugin also allows you to send a test email using the “Email Test” tab, so you can verify if the new sender detail is showing correctly in your outgoing emails.
2. CB Change Mail Sender
An alternative plugin for changing the sender detail is “CB Change Mail Sender”.
In your WordPress admin panel, navigate to “Plugins” > “Add New Plugin” and search for the “CB Change Mail Sender” plugin. Then, install and activate this plugin.
Then, you will see a new menu “CB Mail Sender”. Here, you can simply specify the sender email and name of your WordPress outgoing emails.
Changing the Sender Name using a Custom Plugin
Instead of using existing plugins, we can also create a custom plugin to modify the sender details of outgoing emails.
In order to create this custom plugin, follow the simple steps:
- Create a file and name it “change-mail-sender.php”.
- Inside this file, copy and paste the following code:
<?php
/**
* Plugin Name: Change Mail Sender
*/
defined( 'ABSPATH' ) || die();
function cms_sender_email( $original_email_address ) {
return 'example@domain.com';
}
function cms_sender_name( $original_email_from ) {
return 'Example Sender';
}
add_filter( 'wp_mail_from', 'cms_sender_email' );
add_filter( 'wp_mail_from_name', 'cms_sender_name' );
In this code, you can change the default sender email to any email address “example@domain.com”.
Also, you can change the sender name by changing “Example Sender” in the above code. The default value for the sender name of outgoing email is “WordPress”.
Now, save the file “change-mail-sender.php” with the updated code. Then, create a zip file of this. Let’s call it “change-mail-sender.zip”.
Finally, you can upload this zip file in your WordPress admin by going to “Plugins” > “Add New Plugin” > “Upload Plugin” > “Choose File” and “Install Now”.
Then, you will see the plugin “Change Mail Sender” in “Plugins” > “Installed Plugins”. After you can activate this plugin.
Now, you can check the sender’s name and email by sending an email using WordPress forget password form or any other means.
If you face any issues when changing the sender’s name or email, then you can reach out to us using our contact form.