"use_case": "For production"
Know when your email stops arriving
A provider outage, an expired DNS record or a broken template can stop password resets for hours before anyone notices. Trigger a real one on a schedule and alert when it doesn't land.
Who it's for
- Platform and on-call teams who own transactional email
- Teams that changed email provider, domain or DNS recently
- Products where a missing login code means a locked-out customer
The job
Uptime checks see your API, not your email. A synthetic check does what a customer does: asks for the email and waits for it, from outside your systems, every few minutes.
- 01Register a monitoring account. Sign one account up in production with an address under your project.
- 02Trigger the email on a schedule. Request a password reset or login code every 15 minutes.
- 03Wait with a deadline. receiver wait exits with code 2 when nothing arrives in time.
- 04Alert on failure. Your scheduler or CI alerts you; a webhook can record every delivery too.
A scheduled check in GitHub Actions
The CLI exits 0 when the email arrives, 2 on timeout. Any scheduler that alerts on a failed job works the same way. To be told about every arrival instead, add a webhook.
yaml
name: Password reset email
on:
schedule: [{ cron: "*/15 * * * *" }]
jobs:
check:
runs-on: ubuntu-latest
env:
RECEIVER_API_KEY: ${{ secrets.RECEIVER_API_KEY }}
ADDRESS: [email protected]
steps:
- run: npm install -g @receiverdotemail/cli
- name: Request a reset and wait for it
run: |
SINCE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
curl -fsS -X POST https://app.example.com/api/forgot-password \
-H "Content-Type: application/json" \
-d "{\"email\": \"$ADDRESS\"}"
receiver wait "$ADDRESS" --since "$SINCE" --timeout 120 --linksMeasured from outside
The check goes through your provider, the public internet and real MX delivery, as a customer’s email does.
Links checked too
With --links the CLI prints every URL in the email, so the job can request the reset link and check it works.
Kept apart
Use its own project and key, so monitoring mail never mixes with test runs.