In this guide
The problem is often local mail routing, not the contact form
A company moves its email to Microsoft 365 but keeps its WordPress or PHP website on a cPanel server. Staff can receive ordinary messages in Outlook, yet enquiries submitted through the website never arrive. The form may even display a successful submission message.
One possible cause is that the hosting server still believes it is responsible for email addressed to the company's own domain. Instead of sending the form notification to Microsoft 365, it delivers the message into a local mailbox, queues it or rejects it locally. Public DNS can be correct while this server-side routing remains wrong.
The practical fix is to check both the domain's published MX records and cPanel's Email Routing setting. But diagnose the actual failure first: a broken form, rejected outbound message and incorrectly routed local message can look identical to the person waiting for an enquiry.
Why the website works while email fails
Website hosting and email hosting are separate services. The domain's web records can still direct visitors to a cPanel server while its MX records direct incoming email to Microsoft 365. Moving email does not require moving the website.
Consider a company using enquiries@example.co.za. Its website runs on a hosting server, while enquiries@example.co.za is now a Microsoft 365 mailbox. An outside customer emailing that address follows the public MX records and reaches Microsoft. But a PHP contact-form script running on the hosting server may hand its notification to the server's own mail transport. That transport has its own decision to make about whether example.co.za is a local or remote destination.
If it still treats example.co.za as local, the message may never leave the web server. The visitor sees a thank-you screen, but the sales team sees nothing in Outlook.
First establish whether the form sent anything
Submit a test enquiry using a distinctive reference, such as TEST-2026-EMAIL-01. Record the exact time, sender address and intended destination. Check whether the application stored the submission or generated an email request. A successful web response proves only that the form handler reached that response; it does not prove an email was delivered.
Inspect the site's mail logs or application logs where you have authorised access. Look for the destination address, a delivery ID and the final status. A local delivery entry suggests that the server handled the message itself. A remote SMTP rejection suggests a different problem, such as authentication, sender policy or connectivity. No mail event at all points back towards the form handler, queue or application configuration.
Also test the recipient address from an unrelated external mailbox. If normal external mail reaches Microsoft 365 but only website notifications are missing, that narrows the investigation to the website server and its chosen sending method.
Check the public MX records separately
Find the authoritative DNS provider for the domain and inspect the live MX records using an independent DNS lookup. Compare them with the exact MX value displayed for the domain in the Microsoft 365 admin centre. Do not copy an example MX target from another company's instructions; each setup must use its assigned values.
Do not confuse the public DNS zone with a cPanel server's local copy. The public MX result tells other mail systems where to deliver. The server's local configuration determines what its own mail transport does with messages generated there.
Understand cPanel Email Routing
In cPanel, open Email Routing for the affected domain. The usual choices include Local Mail Exchanger, Backup Mail Exchanger, Remote Mail Exchanger and automatic detection. Local means the server accepts the domain's mail as local. Remote means the server should route mail for that domain towards its configured external mail exchanger instead of accepting it as a local destination.
For a straightforward arrangement where Microsoft 365 handles all mailboxes for the domain and cPanel only hosts the website, Remote Mail Exchanger is generally the appropriate intention. However, don't apply that setting blindly if the server hosts other mailboxes, provides a deliberate mail gateway or uses a more complicated split-delivery configuration. Confirm the architecture with the hosting administrator.
There is a subtle detail worth knowing: cPanel's automatic setting uses the local DNS zone information and does not necessarily perform a fresh public DNS lookup. It also does not continuously correct every historical routing decision after external DNS changes. That is why a perfectly correct MX lookup cannot, by itself, prove that cPanel is routing local website-generated mail correctly.
Do not overlook the From address
Fixing local routing solves only one class of failure. Many forms create a message with the visitor's address in the From field. For example, a customer types a Gmail address, and the website tries to send a message claiming to originate from that Gmail account. Modern receiving systems may reject or quarantine such mail because the sending server is not authorised to represent that sender.
A safer design uses a verified address belonging to the business as the From identity, such as website@example.co.za, and places the customer's address in Reply-To. Staff can still reply directly to the enquiry without the website impersonating the visitor's domain.
What if the website uses a mail plugin?
A WordPress SMTP plugin, a PHP mail library and the server's local mail command do not necessarily take the same route. A plugin using authenticated external SMTP can bypass the local Exim delivery decision for that message, while another plugin or a custom PHP script still hands messages to the local transport.
Document the method used by each form, including booking requests, quotation forms, account notifications and order emails. Don't assume that fixing one contact form fixes every automated message on the site.
A safer design for important enquiries
Email should not be the only record of a valuable sales lead. Save the enquiry in the website database or CRM first, with a timestamp, source page, message and delivery state. Then queue the email notification. If email delivery fails, the enquiry remains available for staff to follow up.
Use a durable queue with limited retries and a visible failure state, rather than retrying endlessly or silently discarding errors. Provide authorised staff with a searchable enquiry inbox. Apply access control, spam protection, appropriate retention limits and secure handling of personal information under the company's POPIA obligations.
A practical verification sequence
Check a unique test submission against the application and mail logs. Verify that ordinary external mail reaches the Microsoft 365 mailbox. Compare the public MX records with the Microsoft 365 admin centre. Confirm the web server's Email Routing decision. Inspect the actual From and Reply-To headers and the outbound delivery method. Then send a fresh test, confirm receipt, and inspect its message headers for the expected sending path and authentication results.
If the test still fails, preserve the message ID and error detail for whoever manages the mail server. Do not repeatedly change DNS, SPF and SMTP settings in the hope that one edit will work. Each serves a different purpose, and indiscriminate changes can disrupt otherwise healthy business mail.
When to involve a developer or hosting specialist
The underlying issue can be a single routing setting, but diagnosing it correctly requires access to the website, DNS and mail-delivery evidence. Complex systems may also contain several independent form handlers and integrations.
Digital4Front develops and supports business websites, hosting environments and custom integrations for South African companies. If website enquiries stopped arriving after an email migration, we can help trace the submission from the form to its intended mailbox and correct the responsible layer. The objective is simple: every valid enquiry must be recorded, traceable and visible to the team that needs it.
