Categorías

Añade emails en copia en los formularios

Categoria:

Wordpress, Contact Form 7

Snippet:

add_action( 'wpcf7_before_send_mail', 'add_my_second_recipient', 10, 1 );

function add_my_second_recipient($instance) {
    $properites = $instance->get_properties();
    // use below part if you want to add recipient based on the submitted data
    /*
    $submission = WPCF7_Submission::get_instance();
    $data = $submission->get_posted_data();
    */
    $additional_recipent = 'lucas@welovewebs.com, victor@welovewebs.com';
    $properites['mail']['recipient'] .= ', ' . $additional_recipent;
        
    $instance->set_properties($properites);
    return ($instance);
}


Versiones:



Descripción:

Añade emails en copia a los formularios de Contact Form 7

Documentación:
https://wordpress.stackexchange.com/questions/367934/how-to-programmatically-send-additional-notification-emails-in-contact-form-7

https://xaviesteve.com/3298/wordpress-contact-form-7-hook-unofficial-developer-documentation-and-examples/
http://hookr.io/plugins/contact-form-7/4.7/filters/



Code Snippets