Files
general-support-template/SETUP.md
Joshua Higgins d540bf8caf misc: init
2026-01-16 11:12:42 -05:00

1.2 KiB

Support Email Site

A Next.js contact form with shadcn-ui that sends emails via SMTP.

Setup

  1. Install dependencies:
npm install
  1. Copy .env.example to .env.local:
cp .env.example .env.local
  1. Configure your SMTP settings in .env.local:
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=your-email@example.com
SMTP_PASSWORD=your-smtp-password
SMTP_FROM=your-email@example.com
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 in your browser.

Features

  • Contact form with name, email, and message fields
  • Server-side email sending via SMTP
  • Form validation
  • Loading states and error handling
  • Built with Next.js 16 and shadcn-ui
  • Responsive design

SMTP Configuration

  • SMTP_HOST: Your SMTP server hostname
  • SMTP_PORT: SMTP port (typically 587 for TLS, 465 for SSL, or 25)
  • SMTP_SECURE: Set to true for SSL (port 465), false for TLS (port 587)
  • SMTP_USER: Your SMTP username/email
  • SMTP_PASSWORD: Your SMTP password
  • SMTP_FROM: The email address to send from (defaults to SMTP_USER if not set)

Build

npm run build

Lint

npm run lint