How put a file when the email is sent to user contact form 7

you can set dynamically the attachements with this filter :

add_filter("wpcf7_contact_form_properties", function ($properties, $contact_form) {


    if (isset($properties["mail"]["attachments"])) {

        $properties["mail"]["attachments"] = "/var/products/file.pdf";

    }


    return $properties;


}, 10, 2);