Recently we had an issue with one of our clients’ Gravity Form on their website. The data wasn’t being passed on to their Google Apps account email because WordPress doesn’t use SMTP mail like Google. Rather, the wp_mail() function makes use of the standard PHP mail() function which was trying to send to the address located on our client’s server. Now this is not entirely WordPress’ fault because on our servers it worked fine. So this also had to do with how their emails were setup on that specific server. Long story short, in order to resolve this issue we installed a simple plugin that would reconfigure the wp_mail() function to use SMTP mail. This made it possible to send all incoming data from the Gravity Forms directly to their Google Apps account. In this article we are going to show you how to install WP Mail SMTP Plugin for WordPress so you can send email using the Gmail SMTP server.
Firs thing you need to do is install and activate the plugin WP Mail SMTP. Upon activation the plugin adds new option under your Settings tab: Settings » Email.
If you click on that, it will bring you to a screen that allows you to configure all of your mail settings. At the top you will have a place to input which email you would like to use as a sender. If you leave that blank, then the default site email will be used. The name field can have your name or your site’s name. This will be shown as the person who is sending it. Make sure you select send all emails via SMTP.
The SMTP host and port are already predefined in the image for Gmail. For your convenient, here they are below:
You can set which type of Encryption you want. This may vary depending on your server settings.
Click save and you are good to go. Before you do anything else, there is the option at the bottom of the screen to send a test email. You should do this to make sure that everything is working properly.