Skip to content

Failure Alerts

SendGrail notifies you the moment an email fails to send. Alerts can land in your inbox and / or on your team chat (Slack, Discord, or Telegram), so delivery problems get noticed before users do.

How It Works

When SendGrail's primary connection (and any configured fallback) rejects an email, the failed event is dispatched to every alert channel you've enabled. Each alert includes:

FieldDescription
Error MessageThe raw error returned by the SMTP server, API, or transport layer.
RecipientThe intended recipient of the failed email.
SubjectThe subject line of the failed email.
TimestampWhen the failure occurred (UTC).
SiteThe WordPress site name (helpful when you run multiple installs).

Email Notifications (Default)

Email is the default alert channel — it works out of the box.

SettingDefaultDescription
notify_on_failuretrueEnable or disable email failure notifications.
notification_emailSite admin emailThe address that receives failure alerts.

Configure both in SendGrail → Settings → Notifications.

Use a different mail provider for the alert address

Point notification_email at an inbox hosted on a different provider than your SMTP connections. If your SMTP provider goes down, alerts sent through it would also fail. Gmail/Outlook/iCloud personal addresses work well.

Chat-based Alert Channels

For team-visible failure alerts in addition to (or instead of) email, configure one or more of:

All enabled channels receive every alert

There's no per-rule routing for chat alerts — whatever you toggle on all gets the same alert payload. Use them as parallel notification paths, not as filters. Email Routing (which decides which provider sends an outbound email) is unrelated to alert dispatching.

Loop Prevention

Failure alerts are designed to never trigger themselves:

  • Notification failures are not reported. If the alert email itself fails to send, no further alert is generated. This prevents an infinite chain of failure alerts.
  • WordPress default mail transport. Email failure alerts are sent using WordPress's native mail function with SendGrail hooks temporarily removed. The alert won't route through the same SMTP connection that's currently failing, won't be logged, and won't be tracked.
  • Chat alerts are direct HTTP calls. Slack, Discord, and Telegram alerts go straight to the platform's API — they don't touch wp_mail() at all and aren't affected by SMTP outages.

Email-only setups depend on the server's mail

Because email alerts bypass SendGrail entirely, they rely on whatever transport WordPress uses natively (typically PHP mail() or a host-configured fallback). If that's unreliable on your server, configure at least one chat channel as a backup.

Best Practices

  • Pick at least one chat channel. Email alerts can be slow or land in spam. A Slack/Discord/Telegram ping reaches you in seconds.
  • Use a different provider for the alert email. If your SMTP connections are all hosted at the same provider, route the alert email through a different one (Gmail, iCloud).
  • Send a test after configuring. Every channel has a Send Test button. Confirm the path works before you need it.
  • Review repeated failures. Repeated alerts for the same connection usually indicate expired credentials, blocked accounts, or a provider outage — handle the root cause rather than silencing the alert.

What's next