This project is a Next.js + Tailwind CSS implementation of the DK RETAIL pages:
/Home/aboutAbout/showcaseShowcase/contactContact
The contact page submits to POST /api/contact, which sends:
- A notification email to the site owner
- A confirmation email to the user
using Zoho SMTP via Nodemailer.
- Install dependencies:
npm install- Copy env template and fill values:
cp .env.example .env.local- Run dev server:
npm run dev- Open
http://localhost:3000
Define these in .env.local and in Vercel project settings:
ZOHO_SMTP_HOST(example:smtp.zoho.com)ZOHO_SMTP_PORT(usually465)ZOHO_SMTP_USER(Zoho mailbox used to send mail)ZOHO_SMTP_PASS(Zoho app-specific password)CONTACT_EMAIL_TO(recipient address for incoming contact requests)
- Use an app-specific password from Zoho.
- Keep SMTP credentials server-only. Do not prefix with
NEXT_PUBLIC_. - Port
465is configured as secure SMTP in this app.
Reference: https://www.zoho.com/mail/help/zoho-smtp.html
- Push repository to your Git provider.
- Import project in Vercel.
- Add all environment variables in Vercel Settings > Environment Variables.
- Deploy.
After deploy, submit the contact form once and verify:
- Owner email arrives at
CONTACT_EMAIL_TO. - User confirmation email arrives at the submitter email.
npm run dev- Start development servernpm run build- Production buildnpm run start- Start production servernpm run lint- Run ESLint