• Resolved Alain Aubry

    (@caban13)


    Hi
    I used other mail sender previously anda I used the following code to avoid sending my local install or from a subdirectory stage install.

    
    add_filter('wp_mail','disabling_emails', 10,1);
    function disabling_emails( $args ){
        unset ( $args['to'] );
        return $args;
    }
    

    This does not work here, can you hint me to fins a solution?

    Thanks
    Alain

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WPManageNinja

    (@wpmanageninja)

    Hello @caban13
    You can enable email simulation from FluentSMTP settings then no email will be broadcasted but will be logged in the database so you can view.

    If you want to disable all emails even logging then use the following code:

    
    
    // disable all wp email
    add_filter('pre_wp_mail', '__return_true');
    
    
    • This reply was modified 3 years, 3 months ago by WPManageNinja.
    Thread Starter Alain Aubry

    (@caban13)

    So quick, thanks!

    Email Simulation is a great feature, would be possible to enable it programatically?
    Let’s say if The current URL = 'something' then filter

    I ask this because I would like to keep the Email Logging (this is another great feature, not seen in other plugins).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘conditional sending’ is closed to new replies.