Support » Plugin: Contact Form 7 » add programmmaticaly file .vcf to contact form

  • i tried to add programmaticaly a file attachement to the contact form but to not avial
    `$mail[‘body’] .= ‘<p>An extra paragraph at the end!</p>’.$vcards;
    $mail[‘subject’] = “Well, hello, Dolly”;

    $cfdata->uploaded_files = array( ‘vcard’ => $vcards );
    $submission->add_uploaded_file(‘csv’, ‘;);
    $cfdata->set_properties(array(‘mail’ => $mail));`

    vcard is the name of the field of the file attachement in contact form7
    I GET the body and the subject like i wrote here but can’t get the attachement!

    i tried also
    function send_vcf( $cf7 ) {
    $id = $cf7->id();
    if ($id!=741){
    $submission = WPCF7_Submission::get_instance();
    $submission->add_uploaded_file(‘vcf’, ‘;);
    thank you

  • The topic ‘add programmmaticaly file .vcf to contact form’ is closed to new replies.