WHMCS E-mail Center module: send every WHMCS e-mail through the E-mail Center API

API & DocumentationWHMCS Modules·· 39 views· 3 min read

With this module, your WHMCS stops using SMTP and sends every e-mail through the E-mail Center API: invoices, tickets and notices. It is for anyone who already uses E-mail Center in their Interweb account.

What it does

It swaps WHMCS's SMTP sending for the E-mail Center API. When a send fails, the reason goes to the WHMCS email log, with the request reference, so you see straight away what happened.

What you need

WHMCS 8 and PHP 7.4 or 8.x with cURL. E-mail Center must be active on your account, and the sender must be at a domain verified in E-mail Center. You also need an API key, created in the API Center of Meu Interweb.

Installing, step by step

1 Download interweb_ao_email_center.zip from the latest release.
2 Unzip it in the main folder of your WHMCS (the one with configuration.php). The files go straight to modules/mail/interweb_ao_email_center.
3 In WHMCS, open System Settings > General Settings > Mail > Configure Mail Provider and choose «E-mail Center (API)».
4 Choose the provider, paste the key and, in "Expected mode", choose Sandbox or Production.
5 Click "Test". The module checks the key and the account and sends a test e-mail.
Do not use "Download ZIP" on the code page. That zip adds an extra folder and WHMCS will not find the module. The right file is interweb_ao_email_center.zip, attached to the release.

The API key and its permissions

One permission is enough: email_center:write. The key is refused if it is in a different mode from the one you chose in "Expected mode". See how to create a key and pick its permissions.

Testing without spending

With a sandbox_ key, the test e-mail is simulated and does not really go out. When everything works, swap it for a prod_ key and set "Expected mode" to Production.

Good to know

Sender: if the WHMCS sender is not at a verified domain, type a verified address in "Sender". Replies still go to the WHMCS address.

When sending fails: the error shows in Utilities > Logs > Email Message Log, with the reason (no credits, monthly limit, domain not verified, revoked key). Requests and answers go to the Module Log, without the key and without the e-mail bodies.

Languages: the settings screen follows the admin's language. The "Error language" setting picks the language of the messages in the email log.

Help

If the module shows an error you do not understand, open a support ticket and tell us the module version and the message you see. The code is in the module repository, under the MIT license.

Ready to send your WHMCS e-mails through E-mail Center?

Download the latest release

SEE ALSO

Getting started with E-mail Center

Sender domain not verified in E-mail Center

Creating an API key

The repository on Interweb Git

SDKs and integrations, in the API documentation

RECOMMENDED PRODUCT

Reseller hosting with WHM

Create, host and bill your own plans, under your own brand. from $35.54/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.