CF Cross-border

A foreign-trade practitioner who builds their own tools

Home/Operations

Why RFQ Notifications Never Reach the Inbox

2026-11-16 · 5 min readOperationsRFQindependent siteemail notificationoperations
Contents
  1. Four gates before a notification lands
  2. One home for the recipient address
  3. Store first, notify second
  4. Two event names save a week of debugging
  5. Do not build the sender from the host
  6. Five checks before you ship
  7. After the bot gate turns on, zero has three causes
  8. Where this applies
  9. FAQ

On 15 November I opened an old RFQ notification config. The recipient address was hard-coded to a real mailbox, committed along with the repository. If the setting was missing, the code fell back to that address.

A hard-coded recipient address is how an RFQ notification fails without leaving a trace.

A wrong address, a person leaving, a site moving to a new domain: the notification still returns success. Nobody reads the mail. The inquiry sits in the database until someone notices a week later.

The only test that counts is seeing the message in an inbox. A 201 from the form and an accepted send call do not count.

Four breakpoints in an RFQ notification

Four gates before a notification lands

An RFQ notification has landed only when a human opens the message in an inbox. A 201 from the form or an accepted send call is not the same thing.

Breakpoint Common version What it looks like when broken What to change
Recipient Hard-coded in code or config A job change or new site sends mail to an old box Keep it in a secret, never in the repo
Sender Built from the current site host The domain cannot send, the provider rejects it One verified sender on your own domain
Missing config Falls back to a default address Logs are clean, nobody knows it is unset Record it as unbound, do not guess
Send failure Caught and discarded The inquiry is stored, the alert is gone A structured log line per failure

The first two eventually show up as "no mail". The last two leave no trace at all, which is what makes them expensive.

One home for the recipient address

A plaintext recipient in a repository is a maintenance problem before it is a security problem. Repositories get copied, exported and handed to contractors. With several addresses, one edit always gets missed.

Set the address as a secret from the command line at deploy time. The value touches no file. The code reads the variable and nothing else.

When the secret is absent, treat the binding as unbound, write one log line, and keep storing inquiries. Do not invent a default. A fallback address is convenient right up to the day the recipient leaves. Then it quietly routes three months of inquiries to a mailbox nobody opens.

Store first, notify second

Order decides whether an inquiry can be lost. The sequence is: validate, write to storage, return success, then send the notification. A failed send does not roll anything back and does not change what the visitor sees.

Storage is the ledger. Notification is the reminder. If the reminder fails, the ledger still has the entry and a person can follow up.

Illustrative timing: a submission reaches storage in under a second. The send adds 0.3 to 2 seconds depending on the mail service. The visitor should not wait for that, so it happens after the response.

Two event names save a week of debugging

Logs must separate "not bound" from "send failed". The first is a configuration problem, the second is a delivery problem, and they are fixed by different people.

Fix two event names, with the site, the first eight characters of the inquiry id, and an error code. Emit JSON rather than prose so the fields can be filtered later.

Three counts are enough for a weekly check: stored inquiries, successful notifications, and each failure event. Any gap between them is an inquiry nobody was told about. Without event names, you are guessing.

Do not build the sender from the host

The platform rule is explicit: the sender must be an address on your own domain with email routing enabled, and the recipient must be a verified destination on the account. See the Cloudflare Email Service send-binding docs (checked November 2026): https://developers.cloudflare.com/email-service/configuration/send-bindings/

A sender assembled as website@current-host gets rejected as soon as a site changes domain or several sites share one codebase. Pin one sender, verify the domain once, and stop editing it.

Five checks before you ship

  1. The recipient secret exists and reads back non-empty
  2. The sender address is verified with the provider
  3. Run once with the recipient unset; an unbound event appears
  4. Run once with sending forced to fail; a failure event appears with a code
  5. Send one real message, see it in the inbox, then check spam

Checks 3 and 4 are the ones people skip. They do not test the feature. They test whether anyone finds out when it breaks.

After the bot gate turns on, zero has three causes

In the same batch of changes, the human check moved from log-only to blocking by default. "No inquiries today" now has three possible causes: nobody came, the gate blocked them, or the notification never left.

All three look identical on the site. Only logs separate them: one event for a block, one for a missing binding, one for a failed send. Without that, an outage reads as a quiet day.

Whether and how to block bots is covered in the RFQ form check post. This one stays on the notification path.

Where this applies

It fits a self-hosted site with a few to a few dozen inquiries a day, where the form backend and the mail sender live in one cloud account.

At hundreds a day, a mailbox is the wrong queue; use a CRM or a ticketing system. With a third-party form service, the chain belongs to the vendor and the only check available is whether a test submission arrives.

FAQ

Does a failed notification lose the inquiry?

No, provided storage happens before the send. What is lost is the reminder, not the record. Compare stored and notified counts before resending anything.

What is the difference between a config file and a secret?

A config file travels with the repository; a secret does not. The practical difference is the cost of change: a new recipient means editing, committing and redeploying in the first case, and one command in the second. The address also stays out of commit history and backups.

Is a message in the spam folder a failure?

By the system's measure it succeeded; by the reader's measure it failed. Judge by the inbox, not the API response. New domains land in spam for the first few weeks, and verifying the sending domain plus SPF and DKIM improves that.

How often should the chain be tested?

One real submission a week, end to end. Test again immediately after any config change, domain change or recipient change. Mark test submissions so they do not mix with real inquiries.

Last updated: 2026-11-16