Change WordPress Sender Mail Address

To change the WordPress sender mail address, use the snippet below:

add_filter( 'wp_mail_from', 'modified_mail_from' );
add_filter( 'wp_mail_from_name', 'modified_mail_from_name' );

function modified_mail_from( $old ) {
    return 'sender@example.com';
}

function modified_mail_from_name( $old ) {
    return 'New Sender Name';
}