Difference between revisions of "How do I use Gmail as my mail server?"

From Joomla! Documentation

(Several markup changes.)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
If you have a working Gmail account you can use Gmail as your mail server by setting it in the global configuration.
+
If you have a working Gmail account you can use Gmail as your mail server by setting it in the Global Configuration.
  
 
On the server tab set the following:
 
On the server tab set the following:
  
 
*Mailer: SMTP
 
*Mailer: SMTP
*Set the next three lines with your information, leave your path untouched unless you are sure it needs to change for some reason.
+
*SMTP Host: smtp.gmail.com
 +
*SMTP Port 465
 +
*SMTP Security: SSL/TLS
 
*SMTP Authentication: Yes
 
*SMTP Authentication: Yes
*SMTP Security: SSL
+
*Set the next two lines with your information. Use an app-specific password (ASP), described below.
*SMTP Port 465
+
*SMTP Username: your Gmail username
*SMTP username: your gmail username
+
*SMTP Password: the app-specific password (ASP) you generated, described below.
*SMTP password: your gmail password
+
 
*SMTP host: smtp.gmail.com
+
The following are also working combinations:
 +
*SMTP Port 587
 +
*SMTP Security: STARTTLS
 +
 
 +
*SMTP Port 25
 +
*SMTP Security: STARTTLS
 +
 
 +
The SSL module does not need to be enabled in Apache.
 +
 
 +
The OpenSSL extension needs to be enabled in PHP. The details can be found at the [https://www.php.net/manual/en/openssl.installation.php php.net Installation page].
 +
 
 +
If you are using WAMP on Windows, the ''openssl'' module is not enabled by default and you need to enable it:
 +
# Open the ''php.ini'' file and uncomment the line <code>extension=php_openssl.dll</code> by removing the semicolon ; from the beginning of the line.
 +
# Save the ''php.ini'' file and restart the Apache service.
 +
 
 +
{{tip|title=Note|Note that if you use 2-step verification in Gmail, add a new password in Settings - Accounts - Change accounts settings - Other Google Account settings - Security - 2-step verification - Manage your application specific passwords.}}
  
The SSL module must be enabled in apache. If it is not, enable it with a2enmod ssl
+
When the new Application-Specific Password (ASP) is presented in groups of four characters separated by spaces, make sure that you do '''not''' enter the spaces into the SMTP password in the mail server settings in Joomla.
  
Note that if you are using WAMP on Windows, you may need to enable the openssl module (which is not enabled by default). To do this:
+
* Application Specific Passwords (ASPs): See the Google Support [https://support.google.com/accounts/answer/185833 Sign in with App Passwords] page.
# Open the php.ini file and uncomment out the line <code>extension=php_openssl.dll</code>.
+
* 2-Step Verification: See the Google Support [https://support.google.com/accounts/answer/185839 Turn on 2-Step Verification] page.
# Save the php.ini file and restart the Apache service.
 
  
 
<noinclude>[[Category:FAQ]][[Category:Server configurations]]</noinclude>
 
<noinclude>[[Category:FAQ]][[Category:Server configurations]]</noinclude>

Latest revision as of 18:04, 11 February 2023

If you have a working Gmail account you can use Gmail as your mail server by setting it in the Global Configuration.

On the server tab set the following:

  • Mailer: SMTP
  • SMTP Host: smtp.gmail.com
  • SMTP Port 465
  • SMTP Security: SSL/TLS
  • SMTP Authentication: Yes
  • Set the next two lines with your information. Use an app-specific password (ASP), described below.
  • SMTP Username: your Gmail username
  • SMTP Password: the app-specific password (ASP) you generated, described below.

The following are also working combinations:

  • SMTP Port 587
  • SMTP Security: STARTTLS
  • SMTP Port 25
  • SMTP Security: STARTTLS

The SSL module does not need to be enabled in Apache.

The OpenSSL extension needs to be enabled in PHP. The details can be found at the php.net Installation page.

If you are using WAMP on Windows, the openssl module is not enabled by default and you need to enable it:

  1. Open the php.ini file and uncomment the line extension=php_openssl.dll by removing the semicolon ; from the beginning of the line.
  2. Save the php.ini file and restart the Apache service.
Note

Note that if you use 2-step verification in Gmail, add a new password in Settings - Accounts - Change accounts settings - Other Google Account settings - Security - 2-step verification - Manage your application specific passwords.

When the new Application-Specific Password (ASP) is presented in groups of four characters separated by spaces, make sure that you do not enter the spaces into the SMTP password in the mail server settings in Joomla.