Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author MC_Will

    (@mc_will)

    Hi abelljefrry,

    You can exclude any email using the mandrill_payload filter.

    Once you have identified CF7 emails, probably by checking the automatic tags, just add a field called force_native to the $message received and set it to true.

    Thread Starter abelljefrry

    (@abelljefrry)

    I’m not really good at writing codes. May I know the code to add that particular field into my $message?

    Thanks in advance. ??

    Plugin Author MC_Will

    (@mc_will)

    Hi,

    I don’t know the exact tags CF7 is using but the general template should look like this:

    public function excludeCF7($message) {
        $cf7_tag = 'cf7_actual_tag'; //Replace with actual tag used by CF7
        if ( in_array($cf7_tag, $message['tags']['automatic']) ) {
            $message['force_native'] = true;
        }
        return $message;
    }
    add_filter('mandrill_payload', 'excludeCF7');
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How To Exclude Contact Form 7 mail from Mandrill?’ is closed to new replies.