feat(02-02): install nodemailer and create contact mailer + server action

- Add nodemailer@^7.0.7 and @types/nodemailer (v7 required by next-auth peer dep)
- Create src/lib/contact-mailer.ts: Nodemailer SMTP transporter + sendContactEmail()
- Create src/lib/contact-action.ts: Server Action with Zod validation, honeypot check
- SMTP credentials read from CONTACT_EMAIL_USER/PASS/SMTP_HOST/PORT env vars
- Add CONTACT_* placeholder vars to .env.local (gitignored, for local setup docs)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Chandler Copeland
2026-03-19 14:59:23 -06:00
parent 0cdf3e5f7d
commit 39f233dbb4
4 changed files with 113 additions and 0 deletions

View File

@@ -16,8 +16,10 @@
"@vercel/blob": "^2.3.1",
"bcryptjs": "^3.0.3",
"drizzle-orm": "^0.45.1",
"lucide-react": "^0.577.0",
"next": "16.2.0",
"next-auth": "5.0.0-beta.30",
"nodemailer": "^7.0.13",
"postgres": "^3.4.8",
"react": "19.2.4",
"react-dom": "19.2.4",
@@ -27,6 +29,7 @@
"@tailwindcss/postcss": "^4",
"@types/bcryptjs": "^2.4.6",
"@types/node": "^20",
"@types/nodemailer": "^7.0.11",
"@types/react": "^19",
"@types/react-dom": "^19",
"dotenv": "^17.3.1",