Why use SMTP?

joomlaBy default Joomla sends emails using PHP mail, using the first user account's email address, and this will often work out of the box. However, depending on where your mail server is hosted, this might not be the best option. Additionally if you want to disable PHP mail to prevent attack from bots that target web host mail servers you will need to provide an alternative mail configuration. This article describes using SMTP with Google Mail.


Email account

It's a good idea to specify a generic email account, rather than use your everyday account. You can then allocate it a complex password that might be changed less frequently. Here are some examples:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.
  • This email address is being protected from spambots. You need JavaScript enabled to view it.
  • This email address is being protected from spambots. You need JavaScript enabled to view it.

It is perhaps worth noting that in the event that your site gets hacked, this user account details are visible unencrypted in the configuration.php file.

 

Global Configuration

Start by logging on to the back-end with an admin account.

  1. Go to System > Global configuration.
  2. Select the Server tab.
  3. In the Mail settings section make the following edits.
    1. From email: This email address is being protected from spambots. You need JavaScript enabled to view it.
    2. From name: Do not reply
    3. Mailer: SMTP
    4. SMTP host: smtp.gmail.com
    5. SMTP port: 465
    6. SMTP security: SSL/TLS
    7. SMTP authentication: yes
    8. SMTP username: This email address is being protected from spambots. You need JavaScript enabled to view it.
      1. Note that for SMTP username you cannot use an alias, it has to be the Google user account name.
    9. SMTP password: yourpassword
  4.  Click Save and Close, to save your changes.

Click the Send Test Email button to check that all is well. This will send an email to the From email address in your configuration, but the email will be from the SMTP user account.

Thanks for visiting.