For our customization want to set wp mail from address when sending mail using wp_mail() then place the following snippet in functions.php within your theme folder!.

function set_wp_mail_from_address( $original_email_address )
{
	$cw_email_from_address = get_option( 'admin_email' );
	return $cw_email_from_address;
}
add_filter( 'wp_mail_from', 'set_wp_mail_from_address' );

Have any doubt, then comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *