Fix Contact Form 7 not working with Dreamhost
Tonight my wife asked for my help trying to sort out why a plugin (Contact Form 7) was not working for a website she was working on for a client. Long story short after some trouble shooting it appeared that we were running into an issue where the e-mail address we were forwarding contact form responses to would work with everything but our contact form. Initially following some threads around the web I tried setting up word press to actually use STMP to send e-mails instead of the PHP mail() command as this had helped some people. However, things still were not working. Luckily I found the thread below which lead me to a solution
The gist of the discussion is that recently Dreamhost decided to cut down on people using shared hosting accounts to send SPAM. We all don’t like spam so I applaud them for taking a stand against the horrible spam (for a quick history of SPAM http://youtu.be/gkBPxfJTjK8). The issue with Contact Form 7 and their new policy is that most users of Contact Form 7 use a setup like so
However the e-mail will really be sent from wordpress@your_domain.com which violates Dreamhost’s new policy. The reason it violates their policy is that you are technically “spoofing” that person’s e-mail address which is now a no-no so trying to send an e-mail like so will fail. You get around this issue by setting up a new hosted e-mail account on dreamhost to put into the From field in Contact Form 7 and then inserting something into the Additional headers box to allow you to just hit reply and actually reply to the person who used the contact form and not your new From e-mail.
In your Dreamhost CPanel you need to go to your Manage E-mail section by clicking on the left panel button e-mail
Now this e-mail address you want to treat as if it isn’t going to ever have anything sent to it, you just want to have it there to be able to send e-mail from so you should minimize the inbox size and let it delete any messages that it gets sent even if they are unread. Here is a snapshot of what your settings should look like. Make sure it is a fully hosted address for your domain and that it just removes e-mails without e-mailing you about it.
Once you’ve managed to set up this e-mail you’re going to want to go to your WordPress admin page’s contact form 7 section and edit your contact forms like so. Setting the From field to the e-mail address you just created and then adding into the Additional headers field the “Reply-To: ” plus whatever contact tag you used to denote the senders e-mail.
Right now this doesn’t appear to alleviate sending attachment problems. Once I get that figured out I’ll share. Good luck!