Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] Receive mail but no attachment :(

  • As in the instructions, I’ve generated the file upload tag and entered this in my form: <p>Send a File
    [file FileUpload limit:2048]</p>

    I then entered [FileUpload] in my Mail form.

    When I test the form (with a 50k jpg) I receive the mail but no attachment.

    I’ve checked the permissions in my upload directory (755 for the WP uploads and 777 for the default CF7 directory. Server is running php5.

    Does anyone have any idea what else I can try?

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


    Which hosting service are you using? It’s possible that some hosting services don’t allow you to send file-attached mail via PHP form. Try asking support of your host. Also, I’d suggest you to ask them to show the mail log, if possible. Sometimes you can find a clue in it.

    Thanks Takayuki,
    I’m using Dreamhost. They usually allow most anything 🙂 But I’ll ask. I do have another php site on DH that uploads files. But maybe that’s a different type of php function? I’m prety ignorant of server stuff, I’m afraid. I appreciate your response.

    Hi guys, I had the same problem. Try forcing php5 in .htaccess make sure the following is included:
    AddHandler php5-script .php

    @takayuki I contacted my hosting service; they assured me this isn’t a problem and will attach files up to 7M. Any other suggestions would be helpful.
    @mrjysta I tried this without any luck 🙁 Am I correct in assuming your direction was to add that one line to my .htaccess file? Or did I miss something? Thanks for your help.

    Plugin Author Takayuki Miyoshi


    Can I check your settings again? Where have you entered [FileUpload] exactly? Have you tried disabling all other plugins AND switching to the default theme? Have you checked your mail log?

    I got the same problem as transformer617. my host allows file-attachment up to 2M. I cant check my mail log as i dont have privileges to do so. how can disabling other plugins and switching to default theme can solve the problem?

    Make sure that you include your [FileUpload] in the form field File Attachments if you want to get it as an attachment not in the Message Body area. If you include it in the Message Body all it will give you is the name of the file.

    Hope that helps.

    @takayuki. I’ve been in communication a number of times with support at Dreamhost. I tried the plugin on another test site with a different host and it worked fine. That led me to believe the issue was with DH. After some back and forth with them, during which time I told them that logic (to me) dictated that the issue lay with them and I sent them the email header (they said there was nothing amiss in my logs), I received the following response (my email header is embedded in this response, if that’s helpful):

    It’s logical, but the only other place it would be, would be the mail transport, and it’s sending the mail, as it should. Our system doesn’t strip attachments at all, so everything on our end is working, as it expected. Since mail is getting sent out, that proves that our system is doing it’s job. An attachment is only txt in the body of an email, so nothing is stripping that out at all. Here’s the logs showing mail was sent:

    Jan 12 21:01:05 mensa postfix/pickup[22105]: CA369ECD66: uid=1070569
    Jan 12 21:01:05 mensa postfix/cleanup[24827]: CA369ECD66:
    Jan 12 21:01:05 mensa postfix/qmgr[32430]: CA369ECD66:
    from=<>, size=879, nrcpt=1 (queue active)
    Jan 12 21:01:05 mensa postfix/smtp[31676]: CA369ECD66:
    to=<>,[]:25, delay=0.04,
    delays=0/0/0/0.04, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as
    Jan 12 21:01:05 mensa postfix/qmgr[32430]: CA369ECD66: removed

    So that leaves one place, the code. Unfortunately, we can’t determine
    why your code isn’t working, so that’s something you’ll need to handle on your own.

    I’ve disabled all of my plugins and checked and rechecked all of my settings. I’ve even changed the test email address I had used to see if that mattered. I wonder if you have any further insights? I apologize for the very long comment!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Contact Form 7] Receive mail but no attachment :(’ is closed to new replies.