Setting up SMTP in Joomla – credentials, sender and the most common errors
In the article Joomla is not sending emails I recommended SMTP as the most reliable way to send. Here I go through the setup step by step: which details you need, how to test properly and what the most common error messages mean.
Why SMTP?
Out of the box, Joomla hands mail to PHP's mail function. Your host's server then sends it, often without logging in and without any connection to your domain. With SMTP, Joomla instead logs in to a real mailbox and sends the mail just as if you had written it in your mail program. The big mailbox providers trust such mail much more.
Preparation: a mailbox of its own for the website
I recommend a separate mailbox just for the website, for example . That has two advantages:
- If someone changes the password of their personal mailbox, the website keeps sending.
- Notices about undeliverable mail end up in one place and not in a colleague's inbox.
You will find the SMTP credentials in your mail provider's help, usually under “set up a mail program” or “IMAP and SMTP”.
The settings in Joomla
You will find them under System → Global Configuration, tab Server, section Mail:
- Mailer: SMTP
- From Email: the address of the mailbox Joomla logs in to. If it differs, many servers reject the mail or it ends up in spam.
- From Name: the name recipients see, for example your company name.
- SMTP Authentication: Yes
- SMTP Security and SMTP Port: SSL/TLS with port 465 or STARTTLS with port 587. Use what your provider states, and never “None”.
- SMTP Host, SMTP Username and SMTP Password: from your provider's details. The username is usually the full email address.
Save, then click Send Test Mail. Joomla sends a test message to the address of your own user account.
Testing properly
A test mail that arrives is a good start, but not proof yet. Also check:
- An address at a big provider such as Gmail or Outlook as recipient. That shows whether the mail ends up in spam.
- A real form on your website, such as the contact form or the registration. Some extensions send with a sender address of their own.
- The headers of the received mail. In Gmail this is called “Show original”. SPF, DKIM and DMARC should each say PASS there. I explain what these three mean in SPF, DKIM and DMARC explained.
The most common error messages
If the test fails, Joomla shows the message from the mail server. The most common ones:
- “Could not authenticate”: username or password is wrong. With providers that use two-factor login you often need a separate app password; the normal password will not work then.
- “Could not connect to SMTP host”: host, port and security do not fit together, or your host blocks outgoing connections on that port. Try the other combination of port and security. If that does not help, ask your host.
- Certificate errors: the host name does not match the mail server's certificate. Enter exactly the name your provider gives, not another address that merely points to the same server.
- Sender rejected (for example “Sender address rejected”): the From Email does not belong to the mailbox Joomla logs in to.
The tricky part: it works until it doesn't
Once SMTP is set up, nobody thinks about it any more. Then the password is changed, the provider switches its login method, or the mailbox is full. From that moment on, every mail from the website fails and nobody notices. Joomla only shows the error to the visitor who has just submitted the form.
With Mail Log you see every failure
That is why I developed Mail Log. It records every mail your website sends with its status and, if it fails, with the exact message from the mail server. It also records a complete outage of the outgoing mail server and, if you wish, notifies the administrators. You resend a lost mail with one click.
The Free version costs nothing and has no time limit. The Pro version retries failed mail automatically and switches to a second sending route when the first one fails.
This article is also available in German.

Related extension
A question about this topic, or an idea for the next guide? Write to me.
Norbert Graup
One membership: all Pro versions, updates and personal support.














