With:
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 "example.com - Admin";
}
I adjusted the 'user' of the host in the 'function.php' for sending system emails. When testing the contact page, this also works wonderfully and the system fires the message to the admin(not on the same host).
When I test the 'Reset password' (forgotten password?) function, the system does not fire an email (not even to the admin). If a user wants to register, the system also does not fire a registration email. The root directory is recursively owned by www-data:www-data (there were problems installing plugins until I changed them to this user).
Why does it work properly with the contact form but not with new registrations and PW resets? What do I have to do to fix the error or what could be the problem?
…Thank you in advance
wp_mail_from
is not where the server is, it'll see the mismatch and see it as super suspicious. A lot of shared hosts also get put on lists due to hacked sites sending out spam