Quantcast
Channel: WordPress.org Forums » [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin] Support
Viewing all articles
Browse latest Browse all 4996

casiepa on "[Plugin: WP Mail SMTP] Test email works, but Gravity Form Notification email does not"

$
0
0

Hi,
I ran into similar issues with WP-mail-SMTP for other plugins. I had to add the following filters to make sure the 'FROM' was correctly set. I have added these lines into my own plugin.
Let me know if it helped for you.
Pascal.

/**
* Since the install of WP-Mail-SMTP we need to make sure the FROM is the same as the one specified in the plugin
* These filters will overwrite any FROM send by other plugins.
*/
add_filter('wp_mail_from','custom_wp_mail_from');
function custom_wp_mail_from($email) {
	return get_option('mail_from');
}
add_filter('wp_mail_from_name','custom_wp_mail_from_name');
function custom_wp_mail_from_name($name) {
	return get_option('mail_from_name');
}

Viewing all articles
Browse latest Browse all 4996

Trending Articles