• Resolved M3

    (@emmtre)


    The tests to apply external filters to these values before using our own doesn’t work in the new version of the plugin. If you already have set other values for name and email via the filters wp_mail_from and wp_mail_from_name Mailgun the name WordPress and email wordpress@sitename is used despite the settings in Mailgun. And the native WordPress mail notification can’t use the filters already set in the custom function file when the Mailgun plugin is active now. Before these settings in the new Mailgun version you could set name and email via the filters and it worked both in Mailgun and other WordPress instances like comment notifications.

    // Attempt to apply external filters to these values before using our own.
    if (has_filter(‘wp_mail_from’)) {
    $from_email = apply_filters(‘wp_mail_from’, $from_email);
    }

    if (has_filter(‘wp_mail_from_name’)) {
    $from_name = apply_filters(‘wp_mail_from_name’, $from_name);
    }

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter M3

    (@emmtre)

    I think you have to remove the filters before applying your owns.

    remove_filter(‘wp_mail_from’,’custom_wp_mail_from’);
    remove_filter(‘wp_mail_from_name’,’custom_wp_mail_from_name’);

    Plugin Author Mailgun

    (@mailgun)

    @emmtre Do you mind trying the latest release before I push it to the public? You’d need to uninstall the current Mailgun plugin and install this zipball in its place. I’m hoping that will fix the wp_mail_from / wp_mail_from_name problem.

    Thread Starter M3

    (@emmtre)

    @mailgun I just did a quick test and it looks like it’s working now. I will do some more testing when I have time after the holidays. Many thanx for your quick response and help. Keep up the good work!

    Plugin Author Mailgun

    (@mailgun)

    @emmtre Thank you for testing it out, glad it’s working for you! Happy holidays!

    Same problem here, and the zip above fixed it. Please push the update out soon – thanks!

    Plugin Author Mailgun

    (@mailgun)

    I’ve cut the 1.5.4 release, should be pushed out to WordPress momentarily. Thanks for trying out the beta ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp_mail_from filters doesn’t work’ is closed to new replies.