Contact Form 7
Autoresponse attachments (2 posts)

  1. hydrurga
    Posted 2 years ago #

    For information, I have just written a piece of code to use in my child theme functions.php which allows me to attach 3 specific files, referred to by their URLs, to the auto response email (Mail(2)) for a Contact Form 7 form with a specific id.

    The code in question is situated at http://pastebin.com/19JS9yia, and builds on code located at http://wordpress.org/support/topic/contact-form-7-sending-attachments-without-user-upload?replies=33 and http://www.php.net/manual/de/function.mail.php#105661, for which I thank both authors.

    I hope it may be useful to somebody.


  2. hydrurga
    Posted 2 years ago #

    A follow-up note: due to the nature of existing code in the phpmailer module (called by wp_mail which is in turn called by Contact Form 7), emails with attachments produced by the code above will not display correctly in Hotmail (Gmail and RoundCube work fine).

    Allowing autoresponses with attachments (that were not originally uploaded) is still a feature that is sorely lacking in Contact Form 7. Someone fills in a simple form with their name and email address, you want to auto send them a brochure or more information in an attachment? No can do unless you modify some of the Contact Form 7 code yourself. Or as far as I can see anyway.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic