How can change content/keyword in “From:” in mail address


We can change “From:” address using hooks in wordpress. Just copy this code and paste into your themes function.php file.
 /* Custom mail content */
 /*
Custom mail content
*/
    //email from name function
function my_wp_mail_from_name($name) {
    return get_bloginfo('name');
}

//email from email function
function my_wp_mail_from($content_type) {
  return get_bloginfo('admin_email');
}

add_filter('wp_mail_from','my_wp_mail_from');
add_filter('wp_mail_from_name','my_wp_mail_from_name');
Advertisements

Sr. Software Engineer

Posted in Wordpress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: