In Part 1 of Eliminating Contact Form Failures I showed you how to set up and configure Contact Form 7. I also detailed how you can drastically reduce spam by using Google’s ReCaptcha service. In this concluding post, I’ll go over how you can save your contact form messages and have those messages sent through SMTP instead of PHP.
Saving contact form responses
Even if you have properly configured your server or hosting environment, it is impossible to guarantee a 100% success rate of contact form submissions. The one thing that can be done is to have submissions saved to your WordPress database immediately after the send button is hit. You can do this with Contact Form 7’s companion plugin, Flamingo. It should be noted that this plugin will ONLY work with Contact Form 7.
Active Installations: 200,000+ | Last Updated: 4 Months Ago | As of 12/4/17
- Navigate to Plugins / Add New in your wordpress dashboard
- In the Search plugins… box enter “Flamingo”
- Install and activate the plugin
- The plugin will now start saving submissions from CF7
- Navigate to Flamingo / Inbound Messages in your wordpress dashboard to review saved submissions
- If you use customized tags for the Name, Email, and Subject fields you can adjust accordingly in CF7’s additional settings.
Input your custom shortcode tags for Name, Email, and Subject here
Keep in mind that each saved contact form submission will make your database grow larger. If you receive a ton of responses throughout the course of a year, it may be worthwhile to delete older messages that are no longer needed. You can also export messages through Flamingo and then delete if you wish to retain records. Overall, you shouldn’t expect your website performance to be impacted.
Sending contact form messages through SMTP
If you are a server administrator responsible for many WordPress websites, it would be very beneficial to use SMTP on your client’s contact forms. The default PHP Mail function works great for most single-site web hosting. Of course, errors do happen from time to time and SMTP is no exception to this. A greater concern arises when multiple websites on your server are sending contact form responses to email addresses OUTSIDE of your server. Typically, most hosting companies will limit SMTP relays on your leased VPS or dedicated server. When a message is submitted through a contact form and the recipient email address is your customer’s Gmail account, your server will “Relay” it to that customer’s mail server. If you have a lot of customers who receive many contact form submissions, this daily limit can be reached very quickly.
In order to avoid hitting this limit, you can use a plugin to send submissions through that particular customer’s email account. The form would technically be the sender and recipient of the submission. You would need to have that customer provide you with their SMTP login details such as the SMTP Server Name, Port #, User Name & Password. A lot of people might be reluctant to give their email account username and password. That is understandable, and it doesn’t have to be their account specifically. As long as it is an email address with the same domain that they want to receive messages.
Setting up a dummy email account
Let’s say your customer’s email address is bob@goodplumbing.com. They want all of the submissions to go that email. They do not want to provide their login credentials. If they would be willing to create or use a dummy email account such as noreply@goodplumbing.com than your SMTP relay limit won’t be affected and they can rest assured that their login information is safe. You could try using a completely different email address on a different domain. The downside of that is that there is a great risk of some mail servers rejecting messages and have them marked as “spoofed”.
Installation and set up of WP Mail SMTP
While it is more work for the administrator to configure and set up individual websites with their own SMTP configuration, the popular plugin WP Mail SMTP makes it as painless as possible.
Active Installations: 700,000+ | Last Updated: Today | As of 12/4/17
- Navigate to Plugins / Add New in your wordpress dashboard
- In the Search plugins… box enter “WP Mail SMTP”
- Install and activate the plugin
- Visit their plugin page for configuration instructions
Yes, I just hyperlinked the configuration instructions for the plugin. I feel dirty doing so! But there are so many different email providers, questions, and technical details that I couldn’t possibly cover everything in a summary. On a serious note, the support for the plugin by the author is top notch. Check out the reviews if you don’t believe me. Of course, it is a lot more involved than just letting PHP send emails to your clients. But if you do expect to grow your customer base and want to have less stress on your server, SMTP is the way to go.