Change sending domain in WordPress

Contact us

Change sending domain in WordPress

In WordPress you can force all emails to be sent from a certain email address using the following PHP code in functions.php.

function wpb_sender_email( $original_email_address ) {
return 'noreply@example.com';
}
add_filter( 'wp_mail_from', 'wpb_sender_email' );

25 September 2018