{"id":20617833,"url":"https://github.com/ozcancelik/nextjs-mail-form","last_synced_at":"2025-04-15T11:36:48.374Z","repository":{"id":87854264,"uuid":"583576368","full_name":"ozcancelik/nextjs-mail-form","owner":"ozcancelik","description":"Next.js contact form with nodemailer, React Hook Form, Zod, Tailwind CSS, reCAPTCHA, Handlebars with TypeScript","archived":false,"fork":false,"pushed_at":"2024-05-10T07:12:39.000Z","size":496,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-10T08:28:14.435Z","etag":null,"topics":["axios","handlebars","nextjs","nodemailer","react-hook-form","react-icons","recaptcha","smtp","tailwindcss","validation","zod"],"latest_commit_sha":null,"homepage":"https://github.com/ozcancelik/nextjs-mail-form","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozcancelik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-30T07:42:47.000Z","updated_at":"2024-05-10T08:28:15.192Z","dependencies_parsed_at":"2024-05-07T14:50:05.978Z","dependency_job_id":null,"html_url":"https://github.com/ozcancelik/nextjs-mail-form","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozcancelik%2Fnextjs-mail-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozcancelik%2Fnextjs-mail-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozcancelik%2Fnextjs-mail-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozcancelik%2Fnextjs-mail-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozcancelik","download_url":"https://codeload.github.com/ozcancelik/nextjs-mail-form/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224911873,"owners_count":17390844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","handlebars","nextjs","nodemailer","react-hook-form","react-icons","recaptcha","smtp","tailwindcss","validation","zod"],"created_at":"2024-11-16T12:06:08.941Z","updated_at":"2024-11-16T12:06:09.395Z","avatar_url":"https://github.com/ozcancelik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js contact form with nodemailer, React Hook Form, Zod, Tailwind CSS, reCAPTCHA, Handlebars with TypeScript\n\n### This is a template for a contact form with Next.js. It uses a custom server to send the email and validate the form. It also uses reCAPTCHA to prevent spam. Handlebars is used to create the email template.\n\n# For `app router` with `server actions` visit [https://github.com/ozcancelik/nextjs-14-mail-form](https://github.com/ozcancelik/nextjs-14-mail-form) repository.\n\n## Demo\n\nhttps://nextjs-mail-form-ozcancelik.vercel.app/\n\n## Features\n\n- [x] [Next.js](https://nextjs.org/)\n- [x] Custom server: You can run with different port. It's useful for same server with other apps.\n- [x] [Nodemailer](https://nodemailer.com/)\n- [x] [React Hook Form](https://react-hook-form.com/)\n- [x] [Zod](https://zod.dev)\n- [x] [reCAPTCHA with react-google-recaptcha](https://github.com/dozoisch/react-google-recaptcha) It uses the invisible reCAPTCHA v2.\n      More info about reCAPTCHA: https://developers.google.com/recaptcha/docs/display\n- [x] Email templating with Handlebars. https://github.com/yads/nodemailer-express-handlebars\n- [x] [TypeScript](https://www.typescriptlang.org/)\n- [x] CSS with [Tailwind CSS](https://tailwindcss.com/)\n- [x] Icons with [React Icons](https://react-icons.github.io/react-icons/)\n\n## How to use\n\n### Prerequisites\n\n- Clone the repository and install the dependencies.\n- Create a `.env` file or change the name of `.env.example` to `.env` and fill the variables.\n\n```bash\nSERVER_PORT=\nCONTACT_FORM_SEND_EMAIL=\nCONTACT_FORM_RECEIVE_EMAIL=\nCONTACT_FORM_PASS=\nCONTACT_FORM_HOST=\nNEXT_PUBLIC_RECAPTCHA_SITE_KEY=\nRECAPTCHA_SECRET_KEY=\n```\n\n### Install dependencies\n\n```bash\nnpm install\n# or\nyarn\n```\n\n### Run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\n### Build the app\n\n```bash\nnpm run build\n# or\nyarn build\n```\n\n### Run the production server:\n\n```bash\nnpm run start\n# or\nyarn start\n```\n\n# Notes\n\n- You can change the server port in `.env` file. If empty, it will use the default port 3000.\n- If you have problems with Nodemailer, you can try to change the port or other settings. You can find more info in the Nodemailer documentation. More info: https://nodemailer.com/smtp/\n- Gmail requires you to enable \"Less secure app access\" in your account settings. More info: https://nodemailer.com/usage/using-gmail/\n- For the reCAPTCHA to work, you need to add the domain to the reCAPTCHA admin panel.\n\nTested with Node.js v20.11.1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozcancelik%2Fnextjs-mail-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozcancelik%2Fnextjs-mail-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozcancelik%2Fnextjs-mail-form/lists"}