Switch email provider from Resend to Mailgun and add cron scheduler
Some checks failed
Deploy / deploy (push) Failing after 1m43s

- Replace resend package with mailgun.js and form-data
- Update email.ts to use Mailgun API with lazy client initialization
- Add instrumentation.ts to schedule cron jobs (notifications :00, Garmin :30)
- Update tests for Mailgun mock structure
- Update .env.example with MAILGUN_API_KEY and MAILGUN_DOMAIN

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-20 19:37:24 +00:00
parent 6543c79a04
commit ccbc86016d
6 changed files with 369 additions and 104 deletions

View File

@@ -19,8 +19,10 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"drizzle-orm": "^0.45.1",
"form-data": "^4.0.1",
"ics": "^3.8.1",
"lucide-react": "^0.562.0",
"mailgun.js": "^11.1.0",
"next": "16.1.1",
"node-cron": "^4.2.1",
"oauth-1.0a": "^2.2.6",
@@ -29,7 +31,6 @@
"prom-client": "^15.1.3",
"react": "19.2.3",
"react-dom": "19.2.3",
"resend": "^6.7.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.0",
"zod": "^4.3.5"