Title: Excluding all plugins by default
Last modified: August 31, 2016

---

# Excluding all plugins by default

 *  Resolved [darkpollo](https://wordpress.org/support/users/darkpollo/)
 * (@darkpollo)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/excluding-all-plugins-by-default/)
 * Is it possible to add an option to override all plugins and only use this for
   the passsword reset emails?
 * I am using memberpress and this add a layer on top of their templates which is
   not useful.
 * Thanks
 * [https://wordpress.org/plugins/wp-html-mail/](https://wordpress.org/plugins/wp-html-mail/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Hannes Etzelstorfer](https://wordpress.org/support/users/haet/)
 * (@haet)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/excluding-all-plugins-by-default/#post-7169362)
 * You can exclude specific emails if you can identify it by subject, sender or 
   content.
 *     ```
       function haet_exclude_from_template( $email ){
           $to = $email[0];
           $subject = $email[1];
           $message = $email[2];
   
           // do not use template if $subject = foo
           if( $subject == 'foo')
               return false;
           return true;
       }
       add_filter('haet_mail_use_template','haet_exclude_from_template');
       ```
   
 *  Thread Starter [darkpollo](https://wordpress.org/support/users/darkpollo/)
 * (@darkpollo)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/excluding-all-plugins-by-default/#post-7169367)
 * I suppose I can do that, but it seems that your plugin overrrides the defaults
   on wordpress and do not follow the right procedure.
    Memberpress has an option
   to use the default template for emails or not, using your plugin, that option
   is ignored and your template is allways used.
 * I have deactivated it.
 * I just need a simple plugin to modify the reset password emails, the rest are
   handled by memberpress already.
    Yours seems too much for what I need.
 * Thank you anyway!
 *  Plugin Author [Hannes Etzelstorfer](https://wordpress.org/support/users/haet/)
 * (@haet)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/excluding-all-plugins-by-default/#post-7169432)
 * You can use it that way. Just use the filter above and only return true if you
   detect your password reset mail. In all other cases return false.
 *  Thread Starter [darkpollo](https://wordpress.org/support/users/darkpollo/)
 * (@darkpollo)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/excluding-all-plugins-by-default/#post-7169567)
 * Hi,
    I am trying this and I cannot make it work at all. I am using this code:
 *     ```
       function haet_exclude_from_template( $email ){
           $to = $email[0];
           $subject = $email[1];
           $message = $email[2];
       if( $subject == '[BLOGNAME] Password Reset')
               return true;
           return false;
       }
       add_filter('haet_mail_use_template','haet_exclude_from_template');
       ```
   
 * And it looks like the subject is never a match. I have tried other options but
   it seems something is not right.
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Excluding all plugins by default’ is closed to new replies.

 * ![](https://ps.w.org/wp-html-mail/assets/icon-256x256.png?rev=1730334)
 * [Email Template Designer - WP HTML Mail](https://wordpress.org/plugins/wp-html-mail/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-html-mail/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-html-mail/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-html-mail/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-html-mail/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-html-mail/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [darkpollo](https://wordpress.org/support/users/darkpollo/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/excluding-all-plugins-by-default/#post-7169567)
 * Status: resolved