Skip to main content

How to Configure Gmail SMTP

Learn how to configure Gmail SMTP on Cloudways to send transactional emails securely with improved deliverability and zero server hassles.

Written by Syed Abuzar Mehdi
Updated over 3 weeks ago

Configuring Gmail SMTP on your Cloudways server allows you to send reliable transactional emails—such as password resets, order confirmations, and notifications—directly from your applications using your Gmail account.

This setup ensures better email deliverability, reduces spam risks, and removes the need to rely on server-based mail services, which are often blocked by major email providers.

In this article, you’ll learn how to enable Gmail SMTP by securing your account with 2-Step Verification, generating an App Password, and integrating the credentials within the Cloudways platform.

Whether you’re running a WordPress, Magento, or Laravel app, this guide helps ensure that your emails reach inboxes—not spam folders.


Table of Contents:


Why Choose Gmail SMTP for Sending Outgoing Emails?

Gmail offers a free and reliable SMTP server that you can integrate with your applications hosted on Cloudways.

This is an excellent option for individuals, startups, or small businesses looking to send transactional emails—such as user registration confirmations, password resets, or order receipts—without maintaining a separate email server.

Using Gmail SMTP eliminates the hassle of server-side mail configurations and helps improve email deliverability.

External SMTP services like Gmail, Elastic Email, Mailgun, and SendGrid are generally more trustworthy than cloud server emails, which are more prone to being marked as spam.

Gmail’s built-in security, reputation, and infrastructure ensure that your emails reach your users' inboxes effectively.

This guide will walk you through the process of connecting Gmail SMTP with your Cloudways server, so you can send emails confidently and efficiently.

Why Use a Free Gmail SMTP Server?

Let’s dive into this question to see why one should use a free Gmail SMTP server.

If you are a small business or an individual with minimal email volume, then free Gmail SMTP can be considered a good option as a daily driver for your outgoing emails.

It offers several other benefits that you might want to consider:

  • Google infrastructure is extremely reliable, and also Gmail SMTP does not utilize port 25, which prevents spam flagging and limits your emails to get blocked from ISP.

  • It is also secure as it needs two-factor authentication.

  • It also offers the option of having Google save and index the emails you send via the Gmail SMTP server. Hence, your sent emails are backed up on Google’s servers, which means you also get detailed and searchable logs.

Please note that you can send up to 100 emails/day as per Google’s policy of sending limits if you are relaying the emails via its portable SMTP server. It also sums up to 3000 emails/month for free.

Tip:

If your email volume is greater and you are looking for a reliable email gateway provider, you may also consider using an Elastic Email add-on at Cloudways, starting from as low as $0.10 for 1000 emails.

How to Configure Gmail SMTP?

First of all, you need to get your Gmail SMTP credentials to be used while integrating Gmail SMTP with your Cloudways server.

Important:

Please be advised that you need a Gmail account or paid Google Apps Account to integrate SMTP. If you do not have an account and you are choosing to use Gmail as your email gateway provider, then you may create an account first before proceeding with this guide.

Step #1 — Accessing Google Account:

  1. Log in to your Google account with your login credentials. First, enter your email address and click Next.

2. Now, input your login password and click Next.

Step #2 — Enabling 2-Step Verification:

Now, you need to make sure that your Google account is well protected to avoid any intervention when using the SMTP service; therefore, we recommend enabling the 2-step verification offered by Google.

If you have already enabled the 2-step verification, then you may jump to Step# 3.

Note:

You may get an invalid password error in further steps when validating your email if you do not enable the 2-step verification.

How to Enable 2-Step Verification

  1. Log in to your Google account with your login credentials.

  2. Select Security from the left navigation bar.

3. Now, click the 2-Step Verification option from the given choices and complete the further setup.

Important:

When using a Gmail App Password for SMTP configuration, make sure to remove all spaces before entering it in the Cloudways SMTP fields.

Gmail displays the App Password in groups (with spaces for readability), but Cloudways requires it as a continuous string without spaces.

If spaces are included, you may encounter errors such as “No Spaces Allowed.”

Step #3 — Generating App Password:

  1. Now, you need to generate an App Password, which will be used for the SMTP integration, so Click Here to visit the Google App Passwords page to generate an App Password.

2. Then, select the app from the drop-down choice and choose Other (Custom name).

3. Give any name of your choice to your App password and hit Generate. In this example, we are naming this app password as Business email.

4. Once the app password is generated, you need to save it for later.

Step #4 —Configuring SMTP Service On the Server:

Log in to your Cloudways Platform using your email address and password.

  1. From the top menu bar, navigate to the Servers tab.

  2. Then, choose your target server.

3. Next, click on the SMTP option from the left menu bar.

Step #5 — Configuring SMTP Service On Server:

Now, click on this drop-down box, which prompts you to Select SMTP, so choose an option called Your Own SMTP.

Now, you will see a few more fields down after choosing the Your Own SMTP option.

  1. Choose Other, where it prompts you to choose your email gateway provider.

  2. Enter smtp.gmail.com as your host.

  3. Input 465 (SSL) or 587 (TLS) as SMTP port. Postfix (mail transfer agent) on the server prefers STARTTLS (port submission/587) over port 465; hence, it is recommended to use port 587.

  4. Enter your Gmail account’s email (e.g., [email protected]) in the username field.

  5. Enter your App password in the password field.

Finally, hit Save.

Step #6 — Verifying SMTP Configuration:

Cloudways offers you the on-site functionality of testing your SMTP settings immediately after configuring the SMTP service on the server. You can verify if emails are properly dispatching from the server by sending a test email to yourself.

  1. First, click Send Test Email.

2. Next, enter the Sender’s email address (From address).

3. Enter your email address as the recipient (To address).

4. Finally, click Send Test Email.

Tip:

The sender’s email address (From address) should be that verified email for which DNS records are properly pointed. Sender’s email with no DNS authentication will mostly land in spam.

You will also get notified there once the test email is successfully sent.

Your Gmail email service has been successfully configured on your server for outgoing transactional emails.


Integrate the Gmail SMTP Add-on on our managed cloud hosting server easily and leverage the power of free Gmail SMTP.


That’s it! We hope this article was helpful.

Need Help?

If you need assistance, feel free to:

We're here 24/7 to help you!

Did this answer your question?