Custom from email stopped working
-
Hi!
With the latest update (WordPress 4.7) my custom from email address is no longer working. All notification emails to users are now being sent from ‘[email protected]’ instead of ‘[email protected]’ as I set it with the following code in my functions.php
//notification email address change add_filter('wp_mail_from','custom_email_from'); function custom_email_from($mail) { $mail = '[email protected]'; // Replace the email address here // return $mail; } //notification name change add_filter('wp_mail_from_name','custom_email_from_name'); function custom_email_from_name($name) { $name = get_bloginfo('My Site Name');//or put your own text here return $name; }
I tried the following code too, which also did not work.
/** changing default wordpres email settings */ add_filter('wp_mail_from', 'new_mail_from'); add_filter('wp_mail_from_name', 'new_mail_from_name'); function new_mail_from($old) { return '[email protected]'; } function new_mail_from_name($old) { return 'My Site Name'; }
Please help me restore my custom from email address.
Thank you
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom from email stopped working’ is closed to new replies.