• Resolved sassan

    (@sassan)


    Hi,

    I’m using WP version 4.5.2 (currently latest release) and CF7 version 4.4.2 (currently latest release). I built a page to confirm or deny an order for our customers – sorry it’s all in German – wich can only be accessed by an URL with proper parameters. Here is a demo link:

    https://conserve.de/bestellung/?Customer_Number=10000&Customer_Code=CNS&Offer_Number=90000-AGK&Offer_Date=27.04.2016&Clerk=Tat&Offer_Link=https://docs.easybill.de/0b28d1f6cb46050c6f82f41408537753a17fcc0d

    Besides the options to say “NO” to deny the offer and “YES” to accept the offer as it is I also provide the option to say “YES, BUT” and let the customer upload a modified copy of the order (with remarks or deletions); therefore I use a form field “Attachment”.

    [simplehidden Customer_Number default:get][simplehidden Customer_Code default:get][simplehidden Offer_Number default:get][simplehidden Offer_Date default:get][simplehidden Offer_Link default:get]
    
    [select Decision default:2 "Ich m?chte das Angebot NICHT annehmen. | Ablehnung" "Ich m?chte das Angebot wie angeboten annehmen. | Vollst?ndige Annahme" "Ich m?chte das Angebot mit ?nderungen annehmen und lade das bearbeitete Angebot hier hoch: | Modifizierte Annahme"]<br />
    
    [file Attachment limit:5mb]<br />
    
    <p class="wpcf7-subtext">Bitte drücken Sie auf den Knopf "Choose File" und w?hlen Sie die von Ihnen überarbeitete PDF-Datei aus.</p>
    
    <label>Ich best?tige meine Entscheidung durch die Eingabe meines Geburtsdatums:<br />[text* Customer_Birthday]</label>
    
    <label>Bitte senden Sie mir eine Kopie dieser Entscheidung per eMail an:</label><br />[email* Customer_eMail default:get]<br />
    
    <label>[acceptance terms-of-trade] Ich akzeptiere die <a href="/geschaeftsbedingungen/">Gesch?fts-Bedingungen</a> der CONSERVE.</label>
    <label>[acceptance privacy-statement] Ich akzeptiere die <a href="/impressum/#datenschutz">Datenschutz-Erkl?rung</a> der CONSERVE.</label>
    
    [recaptcha size:compact]<br />[submit "Senden"]

    PROBLEM: The attached file does not get delivered with the eMail.

    The eMail (1 to us and 2 to the customer) get delivered properly. But both do not include the attachment.

    Of course I already tried several trouble-shootings:

    change the name of the filed “Attachment” to low caps only (“attachment”) – no result.
    check the htaccess file in the uoload directory (“wp-content/uploads/wpcf7_uploads/”) and commented the line “Deny from all” – no result.
    changed the trustees of the upload directory to 777 – no result.

    Any (quick) help will be appreciated. Thank you very much in advance.

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter sassan

    (@sassan)

    Dear Takayuki,

    thank you very much for your quick reply. I checked the “wp-config.php” file and I could not find the line to define the file path for the temporary uploads:

    define( 'WPCF7_UPLOADS_TMP_DIR', '/your/file/path' );

    So, I added that line at the end of the “wp-config.php”. But, unfortunately, as a novice, I’m not sure how to build that path.

    In order to get to know the path I uploaded a test-file in the “wpcf7_uploads” directory that echoes its absolute file path:

    <? echo dirname(__FILE__); ?>

    Please check it out:

    https://conserve.de/wp-content/uploads/wpcf7_uploads/show_path.php

    [EDIT: The test file “show_path.php” gets automatically deleted after a couple of minutes – I guess that is a cron job running by CF7 to delete temporary uploads. But CF7 deleting files in this directory means CF7 already knows about this directory, right?]

    So wich part of that path should I put in the “define”-statement? I tried theses paths without success:

    + /kunden/conserve.de/sites/conserve_cms/wp-content/uploads/wpcf7_uploads
    + /wp-content/uploads/wpcf7_uploads
    + /uploads/wpcf7_uploads

    Any help will be appreciated. Thank you very much in advance.

    Thread Starter sassan

    (@sassan)

    The solution was so simple: Delete the CF7 Plug-In and re-install it. Everything works like a charm now. The Plug-In obviously got pretty confused after the last update. => don’t update – delete and reinstall to avoid problems.

    Thank you sassan!

    Your solution worked.

    Just for the tip, I followed these steps to not loose all my forms:

    1. I exported all my Contact Forms using WordPress Export tools.
    2. Deactivated and Deleted Contact Form 7
    3. Reinstalled Contact Form 7
    4. Imported contact forms using WordPress Importer (This kept all the id’s so no need to re reference the forms in pages)
    5. Reconfigured ReCaptcha Integration
    6. File upload gets attached to email fine now ??
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CF7 not sending attachments (file) with eMails’ is closed to new replies.