Hi
I'm using the wp_mail_from and wp_mail_from_name filters so that all WordPress emails come from "My Site" <email@example.com> (rather than the default non-existent <wordpress@example.com> address).
However, this filter is also overriding all my notifications sent by Gravity Forms.
Is there a conditional test I can add to the filter function so that it doesn't run if the email is being sent by Gravity Forms?
Here's the code I'm using:
add_filter( 'wp_mail_from', 'send_mail_from' );
add_filter( 'wp_mail_from_name', 'send_mail_from' );
function send_mail_from() {
return get_option( 'wp_mail_from' == current_filter() ? 'admin_email' : 'blogname' );
}
Many thanks
Simon