How to change WordPress default Email From Name and From Address

WordPress sends by default an email from wordpress@domainname.com with WordPress as sender name.

This can be adjusted easily via a filter.

Change the From Address

The filter will change the From address from wordpress@ to the value you specify.

function new_mail_from( $from_email ) {
$from_email = 'myownemail@domainname.com';
return $from_email;
}
add_filter( 'wp_mail_from', 'new_mail_from' );

Change the From Name

To change the From name:

function new_mail_from_name( $from_name) {
$from_name = 'my own sender name';
return $from_name;
}
add_filter( 'wp_mail_from_name', 'new_mail_from_name' );

You can put this code inside your functions.php file.