The "From" Name gets overwritten by wp_mail function
-
The problem reported is that the emails generated by the forms have the “Site Title” in the email From header , instead of the actual one that it should get from whatever the user entered.
I have looked into the classes.php code and tried to debug it. No luck. The email address is correct, just not the name. I have even tried adding the ‘wp_mail_from_name’ hook also, but to no avail.
I have made sure the From field is set correctly within the WP Admin.
At this point, I am running out of options. When I put debug statements in the core wordpress code (inside the wp_mail() function within wp_includes/pluggable.php), I notice that the “From” name gets reset to the “Site Title” after the following call:
$phpmailer->FromName = apply_filters( ‘wp_mail_from_name’, $from_name );Any ideas or suggestions?
- The topic ‘The "From" Name gets overwritten by wp_mail function’ is closed to new replies.