Documentation

✉️ Email Delivery

Documentation, reference material and tutorials for CRM-NG SMTP Email: setup guides for every mail service, troubleshooting, and one article per error message.

WhatsApp alerts

Updated

By Duane GarnerChief Executive Officer (CEO)
Summarize: Claude ChatGPT View Markdown
On this page

Send a WhatsApp message whenever your site fails to send an email, using the WhatsApp Cloud API from Meta.

This article explains how to have CRM-NG SMTP send you a WhatsApp message when an email fails. It uses Meta's WhatsApp Cloud API with your own business number. It is for site owners comfortable with Meta's developer tools who prefer WhatsApp to SMS.

WhatsApp alerts go straight from your web server to Meta. They work even when your mail service is down.

Before you start

You need:

  • A Meta developer account and a Meta (Facebook) business account.
  • An app in Meta's developer dashboard with the WhatsApp product added.
  • A WhatsApp business phone number connected to that app. Meta gives you a test number to start with.
  • The WhatsApp number that should receive the alerts.

The 24-hour rule

WhatsApp only delivers free-form text messages from a business to someone who has messaged that business number in the last 24 hours. CRM-NG SMTP sends plain text messages, not pre-approved templates. If the recipient has not written to your business number recently, Meta will refuse the alert. Send a message from the recipient's phone to the business number to open the window, and keep a second alert channel, such as Slack or SMS, for reliability.

Step 1: Collect your details from Meta

Meta's dashboard is renamed and rearranged often. Look for these names if a page looks different.

  1. Open your app

    Go to https://developers.facebook.com/apps/ and open the app that has WhatsApp added.

  2. Open the WhatsApp setup page

    Find the WhatsApp section, usually called API Setup or similar.

  3. Copy the Phone number ID

    Under your sending number, copy the Phone number ID. This is a long number, not the phone number itself.

  4. Create a lasting access token

    The token shown on the setup page is temporary and expires within about a day. For alerts, create a permanent token through a system user in Meta Business settings, with WhatsApp messaging permission for your app.

  5. Add the recipient

    While using Meta's test number, add the recipient's number to the allowed recipient list on the setup page.

Step 2: Add the details in CRM-NG SMTP

  1. Open the Alerts tab

    Go to CRM-NG SMTP → Settings → Alerts and scroll to WhatsApp Cloud API.

  2. Paste the token

    Put your access token into Access token.

  3. Enter the IDs

    On the Phone ID / recipient row, put the Phone number ID in the first box (Phone number ID) and the recipient's WhatsApp number in the second box (Recipient number).

  4. Save

    Press Save Alert Settings.

Write the recipient number with its country code and no spaces or symbols, for example 15551230001 or 447700900123.

All three values are needed, or no WhatsApp message is sent. After saving, the token box shows Token saved. The token is stored encrypted and not shown again; leave the box empty to keep it.

What the message says

[Your Site Name] WordPress email failed
Subject: Your booking is confirmed
From: bookings@example.com
Error: (the error text from your mailer)

One message is sent per failed email.

Step 3: Test it

First send a WhatsApp message from the recipient's phone to your business number to open the 24-hour window. Then, on a staging site or at a quiet time, put a wrong key or password in your mailer settings on the General tab and send a test from Tools → Email Test. Restore the right settings afterwards.

Troubleshooting

  • No message arrives. The most common reasons are an expired temporary token, a recipient who is not on the allowed list while you use Meta's test number, or the 24-hour window having closed.
  • It worked yesterday, not today. You are probably using the temporary token. Replace it with a permanent system-user token.
  • Outbound requests are blocked. Ask your host to allow HTTPS connections to graph.facebook.com.
  • Cost. Meta may charge for business messages. Check its current pricing.
Go to Top