Notice: spl_autoload_register(): Argument #2 ($do_throw) has been ignored, spl_autoload_register() will always throw in /www/freakify_898/public/wp-content/plugins/google-publisher/ClassAutoloader.php on line 27
Change Default From Address in WordPress : 2 Methods
Categories
WordPress

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 admin@wordpress.com when it send email to any user.

Method #1

Put this code in your theme's functions.php File at the end after ?> & change no-reply@freakify.com and Ahmad Awais

 

<?php
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
 
function new_mail_from($old) {
 return 'no-reply@freakify.com';
}
 
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 :)
<?php
add_filter('wp_mail_from', 'new_mail_from');

function new_mail_from($old) {
$admin_email = get_option('admin_email');
return $admin_email;
}
?>
 
 

By Freakify Editorial

The post was written by the Freakify Editorial Team.

Freakify.com used to be managed by Awais, Maedah and their team before its acquisition.

6 replies on “Change Default From Address in WordPress : 2 Methods”

Comments are closed.