Speed Up Gravity Forms with SMTP

Speed Up Gravity Forms with SMTP


How important are your web forms? If your business relies on lead generation, your online success is inextricably linked to your forms. Without an efficient contact form integration, your conversion and lead generation efforts aren’t likely to produce positive results.

Modern web users don’t suffer the indignity of a slow form lightly—If your Gravity forms are slow and taking too long to submit, this article is for you.

Here’s everything you need to know to speed up Gravity Forms using a simple SMTP plugin.

Slow Gravity Form Submissions

Unfortunately, a malfunctioning form isn’t always obvious — a fact that became clear during the pre-launch testing phase of our new site redesign.

Our tests revealed that our form submissions, sent from our development installation and the live, classic installation, were taking between 24 and 60 seconds to submit — too long.

After exploring Gravity Forms’ support documentation, we were able to quickly rule out our server and WordPress installation issues:

  • WordPress 4.9.8
  • PHP 7.2.8
  • MySQL 5.6.41
  • Generous memory allocations

We then ruled out theme and plugin conflicts following the procedures outlined by the Gravity plugin support team.

Nothing we tried improved the form submission speed.

So, what was going on?

External Email Servers and PHP wp_mail()

By default, WordPress uses PHP’s mail() function to send notifications. Generally, this will work just fine; however, if you’re using a third-party email service, like Office 365 or, in our case, G Suite, PHP mail() is inefficient at best. At worst, it can result in a host of deliverability issues.

Gravity Forms support documentation provides this brief explanation:

Sometimes, due to server settings or e-mail reliability issues, using PHP sendmail does not work. Switching to SMTP can be more reliable and solve many issues.

Solution: Use SMTP to Handle Form Notifications

While it may be possible to optimize our Linux server with additional services and packages to better handle PHP sendmail, it isn’t practical. Fortunately, these changes can be made in WordPress using an SMTP (Simple Mail Transfer Protocol) plugin.

This will allow notifications generated in WordPress to be authenticated by our third-party email provider (G Suite) for better deliverability while simultaneously eliminating the lag associated with wp_mail().

SMTP issues are not limited to Gravity Forms. If you are experiencing issues with form notifications using an alternative form plugin, like Contact Form 7, this implementation should resolve your issues.

See also: How to Implement Redirects with Contact Form 7

Does it work?

After enabling SMTP, we saw an immediate and significant improvement in our form submission speed. The video below shows the speed difference in real-time.

The form submission on the left was taken before implementing SMTP while the form on the right was taken after. The 20-second difference is substantial.

Choosing the Best SMTP Plugin

I look for simple solutions for any technical problem. With a CMS like WordPress, that generally means avoiding additional plugins, especially when the solution creates a dependency between plugins from different developers.

However, after identifying the problem with the help of Gravity Forms support team, it became clear that a plugin would provide the most efficient fix for our painfully slow form submissions.

Currently, a search for the word SMTP on WordPress.org will return 384 plugins — I needed to narrow down the options.

I accomplished this by asking the following questions:

  1. Which SMTP plugins, if any, does Gravity Forms recommend?

Gravity Forms recommends five plugins to handle SMTP:

  • SAR Friendly SMTP
  • Post SMTP Mailer/Email Log
  • Easy WP SMTP
  • SendGrid
  • Mailgun for WordPress
  1. Which of those is being actively developed & maintained?

We’re looking for a reasonably current Last Update and 100% compatibility with our current version of WordPress:

  • SAR Friendly SMTP – 2 days
  • Mailgun for WordPress – 3 weeks
  • Post SMTP Mailer/Email Log – 4 weeks
  • Easy WP SMTP – 3 months
  • SendGrid – 9 months
  1. How many active installations are there?

Active installations are basically endorsements. A large user base is usually indicative of a well-supported, well-documented, and functional plugin:

  • SAR Friendly SMTP – 2,000+
  • Mailgun for WordPress – 70,000+
  • Post SMTP Mailer/Email Log – 70,000+
  • Easy WP SMTP – 300,000+
  • SendGrid – 100,000+
  1. Which plugin does what I want and nothing more?

This is a big one.

Our needs are clear-cut, so we want a plugin that meets that need without bogging down our site with features we won’t use. This immediately narrowed down the options:

  • SAR Friendly SMTP
  • Mailgun for WordPress
  • Post SMTP Mailer/Email Log
  • Easy WP SMTP
  • SendGrid
  1. How do the user reviews and documentation reflect the user experience?

  • SAR Friendly SMTP
    • Low number of reviews
    • Recent negative reviews
    • Grammatical errors in the plugin’s description
  • Post SMTP Mailer/Email Log
    • Past security issues
    • Until recently, poorly maintained
    • Removed from WordPress
      • Re-instated with a new developer
  • Easy WP SMTP
    • Negative reviews are years old
    • Users are reporting an overwhelmingly positive experiences

Based on this criteria, Easy WP SMTP was the clear winner.

Install and Activate Easy WP SMTP
You can install and activate the plugin directly from the admin dashboard’s Plugin menu.

Configuring Easy WP SMTP for G Suite

After installing and activating the plugin, navigate to the Settings menu in the WordPress admin dashboard and select Easy WP SMTP.

  1. From Email Address

    Enter the G Suite email address you want to use to send your form notifications.

  2. From Name

    Typically, your website or business name. For example, we use Rocket Clicks.

  3. Reply-to Email Address

    This can be the same as the FROM EMAIL ADDRESS. If you’d like to discourage direct replies, you may want to use [email protected].

  4. Type of Encryption

    For G Suite, we really only need to choose between two of three options.

  5. SMTP Host

    If you’re using G Suite enter: smtp.gmail.com

    • We’ve put together a list of common SMTP settings for common business email services. You can find it at the end of this post.
  6. SMTP Port

    The G Suite documentation provides three port options:

    • 25
      • Only allows mail to be sent to other Gmail and G Suite users
    • 465
      • Requires a valid SSL
    • 587
      • Requires a valid TLS

      If your site is using https, your safest bet is use port 465. If your SSL certificate includes TLS, 587 will work as well.

  7. SMPT Authentication

    This should already be checked yes. If it isn’t, do so now.

  8. SMTP Username

    Enter your G Suite email address.

  9. SMTP Password

    Enter your G Suite password and Save Changes.

    • We’ll add encryption in the next step to ensure your password stays secure.
  10. Encrypt Password

    • Scroll to the top of the page and select the tab labeled Additional Settings.
    • Check the box to enable AES-256 encryption and Save Changes.

Testing the SMTP Connection

Scroll to the top of the page and select the tab labeled Test Email.

Add an email address other than the From Address specified earlier, a simple subject, and a short message. Then, click Send Test Email.

If the test was successful, you’ll see the following message and receive the test email:

SMPT Connection Success Message

All you need to do now is navigate to one of your web forms on your actual website and submit a test lead.

The form should now be significantly faster. In our case, form submissions speed has improved by 143%.

Troubleshooting SMTP Errors

If you receive an error message, don’t panic.

Return to the SMTP settings page and double check the following fields:

    • SMTP Username
    • SMTP Password
    • SMTP Port:
      • Try one of the alternate port numbers:
        • 25
        • 465
        • 587

If the information is correct or the test email still fails:

  • Login to your G Suite account using the same credentials to make sure your account is active and your username and password are correct.
  • Navigate to Apps > G Suite > Settings for Gmail > Advanced Settings and check the box next to Allow per-user outbound gateways
Enable SMTP for G Suite Users
To Enable SMTP connections in G Suite, check the box highlighted in the image.
  • Now go to Security > Advanced and next to Less secure apps
  • Check one of the following options to enable the connection to your WordPress website
    • Allow users to manage their access to less secure apps (Best option but requires an additional step)
    • Enforce access to less secure apps for all users (Not recommended for security purposes)

Enable users connection to "Less secure apps"

If you selected “Allow users to manage access to less secure apps” you will need to go to the accounts user settings and enforce access to less secure apps for that email account.

If you are still having trouble connecting, contact your web admin to make sure your G Suite account has sufficient privileges.

Support Resources

Common SMTP Host Configurations

Email ProviderSMTP AddressSSL / TLS Ports
G Suitesmtp.gmail.com465, 587
Office 365smtp.office365.com587*, 25
Yahoo Bizmailsmtp.bizmail.yahoo.com465
Zohosmtp.zoho.com465, 587
Rackspace
secure.emailsrvr.com465
Greatmailsecure.greatmail.com2500
Intermediasmtp.fastmail.com465, 587, 25, 1025
SMTP settings for the most common business email providers. * denotes recommended port.

Nick Perow

Nick began his SEO career in 2013 after graduating from UW Milwaukee with an Information Science degree. His background in information architecture, web development, and design have been instrumental in his development as an SEO strategist and solutions-oriented marketing expert.

This Post Has 4 Comments

  1. Ben Page

    Nick,

    This is really helpful because many folks use Gravity Forms on WordPress, and speed is such a critical factor.

    I would love to hear examples of people taking these steps and the before/after effects on conversion rate!

  2. Nick Perow

    Great point Ben! There will definitely be a follow-up based on our internal tracking.

  3. Caelan Huntress

    This is really good stuff. I’m looking forward to implementing this on some of my installs.

  4. Nick Perow

    Thanks Caelan!

Comments are closed.