Contact Form 7 – process form using a PHP script, instead of mailing [closed]

Take a look at the wpcf7_before_send_mail hook CF7 provides.

add_action("wpcf7_before_send_mail", "wpcf7_do_something_else_with_the_data");
function wpcf7_do_something_else_with_the_data(&$wpcf7_data)
{

    // Everything you should need is in this variable
    var_dump($wpcf7_data);

    // I can skip sending the mail if I want to...
    $wpcf7_data->skip_mail = true;

}

Leave a Comment