Tassos Marinos Tassos Marinos Joomla Extensions

How to Send Email in Joomla using the Gmail SMTP Server

Stergos Zamagias
Stergos Zamagias
Published in Tutorials
5 min read
Jul 30 2024
Last updated Jul 31 2024
How to Send Email in Joomla using the Gmail SMTP Server

Are you frustrated with unreliable email delivery on your Joomla site? You're not alone.

Many Joomla users struggle with emails not reaching their destination due to limitations with the default "PHP Mail" method, which often doesn't work due to server restrictions or misconfigurations.

Fortunately, there is a reliable solution using the Gmail SMTP server.

In this article, we'll guide you through the steps to configure your Joomla site to send emails using the Gmail SMTP server, ensuring your emails reach their intended recipients.

Why and When You Need Gmail SMTP Server for Joomla Emails

Joomla sends emails for various important reasons, including new user registration, forgot password requests, automatic updates, and contact forms. These functions are crucial for maintaining site functionality and user communication, and any disruption in email delivery can significantly impact your Joomla site's performance and user experience.

The default method of sending emails in Joomla is through PHP Mail. However, PHP Mail often doesn't suffice for several reasons. Many hosting providers require additional configuration for it to function properly. Even when configured, PHP Mail can be unreliable, leading to emails not being delivered or being marked as spam.

SMTP (Simple Mail Transfer Protocol) is the most reliable and robust email sending method. Unlike PHP Mail, SMTP includes proper authentication, ensuring better email deliverability and security. It provides a more consistent and secure method for sending emails from your Joomla site.

Using the Gmail SMTP server is a reliable solution to overcome these limitations. Gmail's SMTP server ensures prompt and secure email delivery, with emails less likely to be marked as spam. Configuring Gmail SMTP in Joomla is straightforward, making it an accessible and effective solution for all users.

How to Send Joomla Emails Using Gmail SMTP Server

To send emails using Gmail's SMTP server, you must enable two-factor authentication on your Google account (personal or workspace) and generate an app password.

Step 1: Enable 2-Step Verification

2-step verification enhances your Gmail account security by requiring a second form of verification in addition to your password, preventing unauthorized access even if your password is compromised.

For Google Personal Accounts

To enable 2-Step Verification, click here: Enable 2-Step Verification on my Personal Account

For Google Workspace Accounts

To enable 2-Step Verification, click here: Enable 2-Step Verification on my Business Account

Once you've enabled 2-Step Verification on your account, you can create your app password to send emails using the Gmail SMTP.

Step 2: Create an App Password

App passwords allow Joomla to access your Gmail account securely when 2-step verification is enabled. This provides a unique password for Joomla without compromising your main Gmail password.

For Google Personal Accounts

To create an app password, click here: Create an App Password on my Personal Account

For Google Workspace Accounts

To create an app password, click here: Create an App Password on my Business Account

Once you've created your app password, please store it somewhere. In the next step, you'll need to type it into your Joomla Mail Settings.

Step 3: Setup Gmail SMTP Server

Next, log into your administrator panel and click System > Global Configuration > Server.

Locate Global Configuration tab that includes SMTP details

Then, locate the "Mail" section. Joomla uses "PHP Mail" to send emails by default, as seen from the "Mailer" setting value.

Global Configuration Mail Settings Default Settings

We can now start configuring the Mail Settings to use the Gmail SMTP to send emails.

  • Set the From Email to the email address from which your Joomla will send emails. You should set it to the Gmail address you will use to authenticate the SMTP server later.
  • Set the From Name to the name that will be used to send your emails.
  • Select "SMTP" in the "Mailer" option to connect to the Outlook SMTP Server.
  • Set the SMTP Host for Outlook to smtp.gmail.com
  • Set the SMTP Port to 465If your web server blocks this port, use 587 instead.
  • Set the SMTP Security to SSL/TLS or STARTTLS.
  • Enable SMTP Authentication and enter your Gmail email address and app password in SMTP Username and SMTP Password fields, respectively.

Global Configuration Mail Settings Gmail SMTP Settings

That's it! Save your settings after configuring your Mail settings.

Step 4: Test your mail settings

After configuring your mail settings, you should run a test to ensure your credentials are correctly set. To do so, press the "Send Test Mail" button to verify that your settings are valid. If your settings are correct, you should see a green notice, as seen below:

Send Test Email with Gmail SMTP

The test email should now be in your Gmail inbox.

Gmail received successfully using Gmail SMTP

Conclusion

And there you have it! Your Joomla 5 site can now send emails reliably using the Gmail SMTP server. This ensures that important emails, like contact form submissions or password reset requests, are delivered without issues using Gmail SMTP.

Are you looking to create forms and improve your email capabilities? Try using Convert Forms, our easy-to-use form builder. It integrates with Joomla’s email settings, letting you create professional forms, send automatic email notifications, and more!

Joomla Contact Form Builder Extension
Create Beautiful Online Forms that Convert
Create contact forms, payment forms, registration forms, calculator forms and newsletter forms with the most user-friendly Joomla! form builder extension.
5.0 rate from 815 reviews