Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp_mail

// to change from email 
add_filter( 'wp_mail_from', 'custom_wp_mail_from' );
function custom_wp_mail_from( $original_email_address ) {
	//Make sure the email is from the same domain 
	//as your website to avoid being marked as spam.
	return 'webmaster@mydomainname.com';
}

// to change from name
add_filter( 'wp_mail_from_name', 'custom_wp_mail_from_name' );
function custom_wp_mail_from_name( $original_email_from ) {
	return 'WordPress Email System';
}
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+4 =