I set up an emailform in PHP and send it through WORDPRESS. I thought I had everything covered but apparently it keeps displaying WORDPRESS
as the sender instead of
Add a wp_mail_from_name
filter as described in docs to set the sender name.
add_filter( 'wp_mail_from_name', 'custom_wp_mail_from_name' );
function custom_wp_mail_from_name( $original_email_from ) {
return 'MyWebSite';
}
Or if you want to automatically substitute a site name
add_filter( 'wp_mail_from_name', 'custom_wp_mail_from_name' );
function custom_wp_mail_from_name( $original_email_from ) {
return get_option('blogname');;
}