WordPress.org

Support

Support » Plugins and Hacks » Contact Form 7 » [Plugin: Contact Form 7] Add attachment with WPCF7_ContactForm class

[Plugin: Contact Form 7] Add attachment with WPCF7_ContactForm class

  • I am making a plugin/hook for Contact Form 7 that makes a pdf of the form and mails it. I managed to generate a pdf with TCPDF (www.tcpdf.com). This pdf is generated in wp-content/uploads/wpcf7_uploads.

    How can I add the pdf as attachment to the mail? I tried the following, but the pdf file was not attached to the mail.

    add_action('wpcf7_before_send_mail', 'wpcf7_makepdf');
    
    function wpcf7_makepdf(&$wpcf7_class) {
    	...generate pdf...
    
    	$wpcf7_class->posted_data['pdf'] = basename($pdf_file);
    	$wpcf7_class->uploaded_files['pdf'] = $pdf_file;
    }

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Contact Form 7] Add attachment with WPCF7_ContactForm class’ is closed to new replies.
Skip to toolbar