WHMCS Not Sending Emails: SMTP Setup and the Fixes That Work

Send WHMCS mail through SMTP on your own domain, read the Email Message Log, add SPF and DKIM, and fix authentication failed, data not accepted and spam.

Published
Reading time
3 min

An invoice that never arrives is an invoice that never gets paid, and a welcome email in the spam folder means a support ticket ten minutes later. WHMCS sends a lot of email, so it is worth setting up properly once rather than fighting it every month. This is the setup that works, and the errors it fixes.

Use SMTP, not PHP mail

Under Configuration → System Settings → Mail, WHMCS offers PHP Mail and SMTP. Choose SMTP every time. PHP mail hands the message to the server's local mailer with no authentication, which is exactly what spam filters distrust.

Create a mailbox in Plesk on your billing domain, for example billing@yourbrand.com, and fill in:

Field Value
Mail type SMTP
SMTP host mail.yourbrand.com (the hostname on your Plesk mail certificate)
SMTP port 465 with SSL, or 587 with TLS
SMTP username billing@yourbrand.com
SMTP password the mailbox password
From email billing@yourbrand.com
From name your company name

Use the Send Test Email button on the same page. It reports the exact SMTP response, which is where every fix below starts.

Authenticate the domain

SMTP gets the message out of the server; SPF and DKIM get it into the inbox. Both are DNS records on the sending domain.

SPF lists which servers may send for the domain. If Plesk is your only mail server:

yourbrand.com.  TXT  "v=spf1 a mx ip4:203.0.113.10 -all"

DKIM signs each message. In Plesk, enable it under Mail → Mail Settings → the domain → Use DKIM spam protection; Plesk publishes the record itself if it hosts your DNS, or shows you the TXT record to add elsewhere.

DMARC tells receivers what to do with failures and gives you reports:

_dmarc.yourbrand.com.  TXT  "v=DMARC1; p=quarantine; rua=mailto:dmarc@yourbrand.com"

Our guide to SPF, DKIM and DMARC has the copy-and-paste records for other setups.

Read the Email Message Log

Configuration → System Logs → Email Message Log lists every message WHMCS tried to send, with a status. Messages that were sent but not received are a DNS or spam problem; messages that show an error were never handed over, and the error text is the diagnosis.

The errors and their fixes

"SMTP Error: Could not authenticate." Wrong username or password, or the username is not the full address. Plesk mailboxes log in with billing@yourbrand.com, never just billing.

"SMTP Error: Could not connect to SMTP host." Wrong port, or the WHMCS server cannot reach the mail server on that port. Try 587 with TLS instead of 465, and check the firewall between them.

"SMTP Error: data not accepted." The mail server accepted the login but rejected the message. Usually the From address is not the authenticated mailbox, which Plesk blocks to stop spoofing. Set From email to the same address you log in with.

"Certificate verify failed." The SMTP host you entered does not match the certificate. Use the hostname on Plesk's mail certificate, typically mail.yourbrand.com or the server hostname, not the bare domain.

Emails send but land in spam. SPF or DKIM is missing or wrong. Send a test to a Gmail address and open Show original: it says PASS or FAIL for each. Fix whichever fails.

Clients say they receive nothing at all. Check the client's email address for a typo first, then the Email Message Log. If the log shows sent, ask them to check spam and add your address; if there is no entry, the cron is not running and the message was never generated.

Ticket replies by email

If clients reply to ticket emails, WHMCS needs to read that mailbox. Under Configuration → System Settings → Support → Departments, set the department's mail import to IMAP with the same mailbox, and add the POP cron described in WHMCS cron not running. Without it, replies vanish.

Keep the template sane

Under Email Templates, remove the default WHMCS footer text and add your company name, address and a support link. A message that looks like a real company sends better than a raw template, to spam filters and to people.

On VPSPioneer reseller plans, the mailbox, SPF, DKIM and the WHMCS mail settings are configured at hand-over, so the first invoice your first client receives lands where it should.

#whmcs#email#smtp#spf#dkim#deliverability

Keep reading

More from WHMCS

All guides

WHMCS

How to Connect WHMCS to Plesk for Automatic Provisioning

Add your Plesk server to WHMCS, map products to service plans, and fix the errors that stop accounts being created, including the 1019 password policy error.

4 min read →

WHMCS

WHMCS Cron Not Running: How to Find the Cause and Fix It

Why invoices and suspensions stop when the WHMCS cron fails, the exact cron command for WHMCS 9, how to read the cron log, and the six failures we see most.

4 min read →

WHMCS

How to Install WHMCS on a Plesk Server, Step by Step

WHMCS 9 requirements (PHP 8.2+, ionCube 13, MySQL), creating the site in Plesk, running the installer, the cron job and the first settings to lock down.

4 min read →