Home » Labs » WordPress Change Default From Address  

WordPress Change Default From Address

Filed under Labs

Here is a simple snippet which allows you to change default from address when an email send by your wp blog. Simply paste the bellow code into your functions.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@yoursite.com';
function new_mail_from_name($old) {
// change it as you like
 return 'Administrator';

Posts you may like: