Also, forgot to mention that the from name is also set to: WordPress
So the emails from notifications come from:
Wordress <[email protected]>
This is quite strange behavior, as I noticed that in notifications.php you use wp_mail() to send out your email. If so, why isn’t the From information for the emails being taken from the General Settings, which have the Site Title (to be used as From name) and email address (to be used as From email)?
Sorry, I think I’ll answer my own question here, in case anyone else runs into this problem.
For the plugin developers: perhaps this is an issue with wp_mail() and not the plugin per se, but still I think most other plugins will include code that has the from email from the General settings, or they allow you to change this in the plugin admin settings.
To change the functionality of the From Name and From Email for notifications, simply add the filters below to your functions.php, replacing myemail and myname as appropriate:
add_filter( ‘wp_mail_from’, ‘my_mail_from’ );
function my_mail_from( $email )
{
return ‘[email protected]’;
}
add_filter( ‘wp_mail_from_name’, ‘my_mail_from_name’ );
function my_mail_from_name( $name )
{
return ‘My Name’;
}
To clarify, email providers might also mark emails as spam if they’re sent from a different IP address than the domain is mapped to.
Filtering the wp_mail() values is probably the best approach in this context. Nice work on figuring it out 🙂
If I try to add anything like that to my functions.php, I get a server error. Any other ideas?
What’s the server error you get? Can you debug it further? Here’s a quick intro