{"id":19309449,"url":"https://github.com/rborovina/form-mail-sender","last_synced_at":"2026-04-29T01:04:46.722Z","repository":{"id":247787579,"uuid":"755145404","full_name":"rborovina/form-mail-sender","owner":"rborovina","description":"This project is an Express.js application that processes form submissions, verifies reCAPTCHA, and sends form data via email using the Mailjet service.","archived":false,"fork":false,"pushed_at":"2024-07-10T13:18:51.000Z","size":83,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T17:27:55.624Z","etag":null,"topics":["mail-sender","mailjet","nodejs","recaptcha"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/rborovina.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":"2024-02-09T14:14:45.000Z","updated_at":"2024-07-10T15:55:03.000Z","dependencies_parsed_at":"2024-07-10T16:30:47.575Z","dependency_job_id":"ab015114-4d9b-4aef-aeff-60bd7b531c7e","html_url":"https://github.com/rborovina/form-mail-sender","commit_stats":null,"previous_names":["rborovina/form-mail-sender"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rborovina/form-mail-sender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rborovina%2Fform-mail-sender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rborovina%2Fform-mail-sender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rborovina%2Fform-mail-sender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rborovina%2Fform-mail-sender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rborovina","download_url":"https://codeload.github.com/rborovina/form-mail-sender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rborovina%2Fform-mail-sender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["mail-sender","mailjet","nodejs","recaptcha"],"created_at":"2024-11-10T00:19:11.895Z","updated_at":"2026-04-29T01:04:46.708Z","avatar_url":"https://github.com/rborovina.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Form Mail Sender\n\nThis project is an Express.js application that processes form submissions, verifies reCAPTCHA, and sends form data via email using the Mailjet service.\n\n## Features\n\n- **Express.js**: A fast, unopinionated, minimalist web framework for Node.js.\n- **CORS**: Middleware for enabling Cross-Origin Resource Sharing.\n- **Multer**: Middleware for handling `multipart/form-data`, which is primarily used for uploading files.\n- **Nodemailer**: A module for Node.js applications to allow easy email sending.\n- **reCAPTCHA**: Protects the form submission from bots.\n- **Rate Limiting**: Limits the number of requests to prevent abuse.\n- **Axios**: Promise-based HTTP client for the browser and Node.js.\n\n## Requirements\n\n- Node.js\n- npm (Node Package Manager)\n- Mailjet account for sending emails\n- Google reCAPTCHA keys\n\n## Installation\n\n1. Clone the repository:\n\n   ```sh\n   git clone https://github.com/rborovina/form-mail-sender.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```sh\n   cd form-mail-sender\n   ```\n\n3. Install dependencies:\n\n   ```sh\n   npm install\n   ```\n\n4. Create a `.env` file in the root directory and add the following environment variables:\n\n   ```env\n   PORT=3000\n   MAILJET_API_KEY=your-mailjet-api-key\n   MAILJET_API_SECRET=your-mailjet-api-secret\n   EMAIL_FROM=your-email@example.com\n   EMAIL_TO=recipient-email@example.com\n   EMAIL_SUBJECT=Your Email Subject\n   RECAPTCHA_SECRET_KEY=your-recaptcha-secret-key\n   ```\n\n## Usage\n\n1. Start the server:\n\n   ```sh\n   npm start\n   ```\n\n2. The server will run on `http://localhost:3000`.\n\n## API Endpoints\n\n### POST /submit-form\n\n- **Description**: Submits a form with attached photos, verifies reCAPTCHA, and sends the data via email.\n- **Request Headers**: `Content-Type: multipart/form-data`\n- **Request Body**:\n  - `name`: String - Name of the submitter.\n  - `email`: String - Email of the submitter.\n  - `token`: String - reCAPTCHA token.\n  - `photos`: Array - Photos to be uploaded (up to 5 photos, each not exceeding 3MB).\n\n- **Response**:\n  - `200 OK`: Form submitted successfully.\n  - `400 Bad Request`: reCAPTCHA verification failed.\n  - `500 Internal Server Error`: An error occurred during email sending.\n\n### Example Request\n\n```sh\ncurl -X POST http://localhost:3000/submit-form \\\n  -F \"name=John Doe\" \\\n  -F \"email=johndoe@example.com\" \\\n  -F \"token=your-recaptcha-token\" \\\n  -F \"photos=@/path/to/photo1.jpg\" \\\n  -F \"photos=@/path/to/photo2.jpg\"\n```\n\n## License\n\nThis project is licensed under the ISC License. See the [LICENSE](LICENSE) file for details.\n\n## Author\n\nRadmilo Borovina \u003cradmiloborovina99@gmail.com\u003e\n\n## Acknowledgments\n\n- [Express.js](https://expressjs.com/)\n- [Multer](https://github.com/expressjs/multer)\n- [Nodemailer](https://nodemailer.com/about/)\n- [Mailjet](https://www.mailjet.com/)\n- [Axios](https://axios-http.com/)\n- [reCAPTCHA](https://www.google.com/recaptcha/intro/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frborovina%2Fform-mail-sender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frborovina%2Fform-mail-sender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frborovina%2Fform-mail-sender/lists"}