Security events are scattered across the codebase
Login detection, password change handlers, API key creation — each lives in a different service or controller, often with its own email-sending logic.
Trust-critical SaaS emails
New login from a new device, password changed, API key created — each security event should trigger a clear, immediate email. No batching, no delay, no custom notification service.
Login detection, password change handlers, API key creation — each lives in a different service or controller, often with its own email-sending logic.
A security email with a different layout or tone from your product emails looks phishing-like. Users doubt authenticity.
Debugging "did the user receive the new-login alert?" is hard when each service sends independently with no shared audit trail.
Security emails often only exist in one language. Users who set their locale to German still receive an English new-login alert.
Your auth service, API key service, 2FA service — each fires a typed event. else.events routes to the right security email template.
All security emails use the same template system, brand variables and layout as your product emails. No phishing-like inconsistency.
Include a locale in the security event. The right language template is selected automatically.
Every security alert logged in one place — event type, recipient, delivery status, timestamp.
security.new_login Immediate alert with device type, location and "was this you?" link.
security.password_changed Confirmation that password was changed — with a contact link if it was not the user.
security.2fa_changed Security confirmation when two-factor authentication settings change.
security.api_key_created Alert when a new API key is generated — useful for shared accounts.
security.suspicious_activity Flexible alert for any anomaly your backend detects.
One event, consistent template, central log. No custom notification service.