Skip to main content

Task 2: Email Notification Integration (smtp4dev)

Prerequisites

  • smtp4dev running locally at http://localhost:5000
  • .env configured with NOTIFICATIONS_EMAIL_ENABLED=true

Test Cases

IDScenarioExpected ResultStatus
T2-01NOTIFICATIONS_EMAIL_ENABLED=true + SMTP configuredEmail is sent for email-enabled events
T2-02NOTIFICATIONS_EMAIL_ENABLED=falseNo email sent; internal notifications still work
T2-03Trigger each supported eventEmail recipient matches intended role/user mapping
T2-04SMTP available in smtp4devEmail visible in smtp4dev inbox
T2-05SMTP failure/unavailablePrimary API action still completes; no workflow crash

Demo Walkthrough

  1. Open smtp4dev at http://localhost:5000 → Show empty inbox
  2. Trigger an event (e.g., submit KPI self-assessment) → Show email appears in smtp4dev
  3. Click the email → Show the content and recipient are correct
  4. Set NOTIFICATIONS_EMAIL_ENABLED=false → Trigger another event → Show no new email but internal notification still created