How to Change WordPress default from email and name without plugin
This tutorial we are going to see about How to Change WordPress default from email and name Normally WordPress have Default from Email address and its look like this [email protected].
- it not looking professional
- spam filter Consider this as spam mail
WordPress using wp_mail() function for this Process
Here is the solution for this
WordPress have wp_mail_from and wp_mail_from_name Hook Functions
- wp_mail_from – From Mail Address
- wp_mail_from_name – From Name
we can use the two Hook functions to change the From mail and name
Just copy and paste the Below code on your theme’s functions.php file
// Function to change email address function awts_sender_email( $myown_email_address ) { return '[email protected]'; } // Function to change sender name function awts_sender_name( $myown_email_from ) { return 'Santhosh'; } // Hooking up our functions to WordPress filters add_filter( 'wp_mail_from', 'awts_sender_email' ); add_filter( 'wp_mail_from_name', 'awts_sender_name' );
- Replace [email protected] and Santhosh with your From email and name
- That’s all successfully we Change the Sender Name and Email in Outgoing WordPress Email
If you have doubts in this topic Please feel free to comment here.
Read – Redirect the users to Thank you page after commenting
Thanks!
Your feedback helps us improve Allwebtuts.com