I want to set a custom from email address for emails that are sent via a plugin. I don't want to change default email address. The following code is not working:
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from($old) {
return 'your email address';
}
function new_mail_from_name($old) {
return 'your name or your website';
}
wp_mail()
.wp_mail()
instead.