Change Default From Address in WordPress : 2 Methods
Change Default From Address in WordPress by the two methods I am going to list below. Default From address is sometimes like [email protected] when it send email to any user.
Method #1
Put this code in your theme's functions.php File at the end after ?> & change [email protected] and Ahmad Awais
<?phpadd_filter('wp_mail_from', 'new_mail_from');add_filter('wp_mail_from_name', 'new_mail_from_name');function new_mail_from($old) {return '[email protected]';}function new_mail_from_name($old) {return 'Ahmad Awais';}?>
Method #2
Put this code in your theme's functions.php File at the end after ?> and admin Email will be used :)
<?phpadd_filter('wp_mail_from', 'new_mail_from');function new_mail_from($old) {
$admin_email = get_option('admin_email');
return $admin_email;
}?>
Categories: WordPress
Related Stories
How to Add support of Uploading .pdf Files in WordPress
Change Default From Address in WordPress by the tw...
25 Responsive Flat WordPress Themes May 2014
Change Default From Address in WordPress by the tw...