feat: email integration (nodemailer) + wire into agency/license flows

- src/lib/email.ts: SMTP client with pre-built templates:
  - sendAgencyApprovedEmail (reseller approval + discount)
  - sendAgencyRejectedEmail (reseller rejection + reason)
  - sendLicenseKeyEmail (license key delivery)
  - sendTicketCreatedEmail (ticket confirmation)
- Agency approve route: sends approval email after DB update
- Agency reject route: sends rejection email with reason
- License creation route: sends license key email (fire-and-forget)
- Graceful degradation: if SMTP not configured, logs warning + continues
- nodemailer + @types/nodemailer installed
This commit is contained in:
Z User committed 2026-10-28 22:50:42 +00:00
1 parent 7a13dad693
commit 970986fef7
6 files changed
+158 -4

No files matched your search

+2
View File
@@ -57,6 +57,7 @@
"@reactuses/core": "^6.0.5",
"@tanstack/react-query": "^5.82.0",
"@tanstack/react-table": "^8.21.3",
"@types/nodemailer": "^8.0.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
@@ -71,6 +72,7 @@
"next-auth": "^4.24.11",
"next-intl": "^4.3.4",
"next-themes": "^0.4.6",
"nodemailer": "^10.2.1",
"prisma": "^6.11.1",
"react": "^19.0.0",
"react-day-picker": "^9.8.0",