WordPress sends email using apache username
-
Description
Wordpress sends emails using the apache username, that is www-data@domain.com and I do not find any way to change the username of the email from www-data to admin. Any help is very appreciated!Steps taken
1) I have installed ssmtp to take care of sending email and configured it properly (it sends email with the root name as freely specified in the config file).2) I tried to add the following lines in the functions.php of my current theme:
// Function to change email address function wpb_sender_email( $original_email_address ) { return 'admin@domain.com'; } // Function to change sender name function wpb_sender_name( $original_email_from ) { return 'Admin'; } // Hooking up our functions to WordPress filters add_filter( 'wp_mail_from', 'wpb_sender_email' ); add_filter( 'wp_mail_from_name', 'wpb_sender_name' );But I still receive emails from www-data@domain.com.
So I do not know where should I set the username and avoid using the apache username.
The topic ‘WordPress sends email using apache username’ is closed to new replies.