WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Receive mail but no attachment :( (9 posts)

  1. transformer617
    Member
    Posted 3 years ago #

    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?
    TIA
    Bill

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. transformer617
    Member
    Posted 3 years ago #

    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.
    Bill

  4. mrjysta
    Member
    Posted 3 years ago #

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

  5. transformer617
    Member
    Posted 3 years ago #

    @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.
    Bill

  6. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    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?

  7. phaezs
    Member
    Posted 3 years ago #

    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?

  8. diego27
    Member
    Posted 3 years ago #

    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.

  9. transformer617
    Member
    Posted 3 years ago #

    @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
    from=<kenscheider>
    Jan 12 21:01:05 mensa postfix/cleanup[24827]: CA369ECD66:
    message-id=<92198fb92cb2f99e3d223da4f4f02c03@printshopandcopycenter.com>
    Jan 12 21:01:05 mensa postfix/qmgr[32430]: CA369ECD66:
    from=<kenscheider@mensa.dreamhost.com>, size=879, nrcpt=1 (queue active)
    Jan 12 21:01:05 mensa postfix/smtp[31676]: CA369ECD66:
    to=<bill@first-encounter-design.com>,
    relay=crusty.dreamhost.com[67.205.8.12]:25, delay=0.04,
    delays=0/0/0/0.04, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as
    C7E5D11DD79)
    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!
    Bill

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic