{"id":30619061,"url":"https://github.com/lightxlk/nlk-smtp-api","last_synced_at":"2026-04-11T01:32:55.528Z","repository":{"id":310544877,"uuid":"1040233719","full_name":"lightxLK/nlk-smtp-api","owner":"lightxLK","description":"A minimal Next.js API for sending contact form submissions to Gmail using Nodemailer, deployable on Vercel /Netlify.","archived":false,"fork":false,"pushed_at":"2025-08-28T17:59:12.000Z","size":32634,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T00:14:08.899Z","etag":null,"topics":["api","json","nextjs","nodejs","nodemailer","react","smtp","typescript","vercel"],"latest_commit_sha":null,"homepage":"https://nlk-smtp-api-endpoint.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightxLK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-08-18T16:53:06.000Z","updated_at":"2025-08-28T17:59:15.000Z","dependencies_parsed_at":"2025-08-18T20:31:07.552Z","dependency_job_id":"d2aa44b7-bfb7-4832-bf34-dde75aecd819","html_url":"https://github.com/lightxLK/nlk-smtp-api","commit_stats":null,"previous_names":["lightxlk/nlk-smtp-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lightxLK/nlk-smtp-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightxLK%2Fnlk-smtp-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightxLK%2Fnlk-smtp-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightxLK%2Fnlk-smtp-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightxLK%2Fnlk-smtp-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightxLK","download_url":"https://codeload.github.com/lightxLK/nlk-smtp-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightxLK%2Fnlk-smtp-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272847475,"owners_count":25003207,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","json","nextjs","nodejs","nodemailer","react","smtp","typescript","vercel"],"created_at":"2025-08-30T12:17:00.612Z","updated_at":"2026-04-11T01:32:55.436Z","avatar_url":"https://github.com/lightxLK.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# N\u0026N SMTP Contact API\n\nThis is a minimal Next.js API project for handling contact form submissions via email using Gmail SMTP and Nodemailer, developed by Lokesh. \nIt is designed to be deployed on Vercel /Netlify and used as a backend endpoint for static or dynamic websites.\n\n---\n\n## Features\n\n- Accepts POST requests at `/api/contact`\n- Sends contact form details to your Gmail inbox using Nodemailer\n- CORS enabled for requests from your frontend domain\n\n---\n\n## Usage\n\n### 1. **Environment Variables**\n\nSet these in your Vercel/Netlify project settings:\n\n- `GMAIL_USER` – Your Gmail address (e.g. `lokesh@thesocialants.com`)\n- `GMAIL_PASS` – Your Gmail App Password (see [Gmail App Passwords](https://support.google.com/accounts/answer/185833))\n\n### 2. **API Endpoint**\n\nSend a POST request to:\n\n```\nhttps://\u003cyour-vercel-project\u003e.vercel.app/api/contact\n```\n\n**Request body (JSON):**\n```json\n{\n  \"name\": \"Your Name\",\n  \"email\": \"your@email.com\",\n  \"phone\": \"1234567890\",\n  \"subject\": \"Subject\",\n  \"message\": \"Your message\"\n}\n```\n\n### 3. **CORS**\n\nThis API allows requests from `https://nlk.thesocialants.com` by default.  \nTo change, edit the `Access-Control-Allow-Origin` header in `src/pages/api/contact.ts`.\n\n---\n\n## Local Development\n\n1. Clone the repo\n2. Install dependencies:\n   ```\n   npm install\n   ```\n3. Add a `.env.local` file:\n   ```\n   GMAIL_USER=your@gmail.com\n   GMAIL_PASS=your-app-password\n   ```\n4. Run locally:\n   ```\n   npm run dev\n   ```\n\n---\n\n## Security\n\n- **Never commit your Gmail password or app password to the repo.**\n- Always use environment variables for sensitive data.\n\n---\n\n## License\n\nGNU Affero V3\n\n---\n\n**Contact:**  \nFor questions, reach out to [lokesh@thesocialants.com](mailto:lokesh@thesocialants.com) | [light](https://lightxlk.github.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightxlk%2Fnlk-smtp-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightxlk%2Fnlk-smtp-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightxlk%2Fnlk-smtp-api/lists"}