{"id":27096131,"url":"https://github.com/aldotobing/express-mail-service","last_synced_at":"2026-04-10T07:18:07.476Z","repository":{"id":272385522,"uuid":"874615557","full_name":"aldotobing/express-mail-service","owner":"aldotobing","description":"Backend service designed to send emails via a RESTful API. Built with Node.js and Express, it leverages Nodemailer for handling email delivery.","archived":false,"fork":false,"pushed_at":"2025-07-28T08:08:58.000Z","size":967,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T09:11:20.354Z","etag":null,"topics":["backend","docker","expressjs","node-mailer","nodejs","nodemailer-smtp-transport","smtp-mail"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aldotobing.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":"2024-10-18T06:41:11.000Z","updated_at":"2025-07-28T08:09:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd04d40b-efab-40ac-b2fc-bab8f91cc3d6","html_url":"https://github.com/aldotobing/express-mail-service","commit_stats":null,"previous_names":["aldotobing/mail-smtp-service","aldotobing/express-mail-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aldotobing/express-mail-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fexpress-mail-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fexpress-mail-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fexpress-mail-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fexpress-mail-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aldotobing","download_url":"https://codeload.github.com/aldotobing/express-mail-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fexpress-mail-service/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269381305,"owners_count":24407784,"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-08T02:00:09.200Z","response_time":72,"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":["backend","docker","expressjs","node-mailer","nodejs","nodemailer-smtp-transport","smtp-mail"],"created_at":"2025-04-06T09:31:50.848Z","updated_at":"2026-04-10T07:18:02.428Z","avatar_url":"https://github.com/aldotobing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-mail-service\n\n![mail-smtp-service](/maxresdefault.jpg)\n\nThis project is a backend service designed to send emails via a RESTful API. Built with Node.js and Express, it leverages Nodemailer for handling email delivery. This service does not include a frontend; instead, it provides an endpoint for other applications to send emails programmatically.\n\n## Technologies Used\n\n- **Backend**: Node.js, Express\n- **Email**: Nodemailer\n- **CORS**: Middleware to handle cross-origin requests\n- **dotenv**: For managing environment variables\n\n## Installation\n\n1. Clone this repository:\n\n   ```bash\n   git clone https://github.com/aldotobing/express-mail-service.git\n   cd express-mail-service\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Create a .env file in the root directory and configure your SMTP settings:\n\n   ```bash\n   SMTP_HOST=your_smtp_host\n   SMTP_PORT=your_smtp_port\n   SMTP_USER=your_smtp_user\n   SMTP_PASS=your_smtp_password\n   ```\n\n4. Start the server:\n\n   ```bash\n   node index.js\n   ```\n\n5. The service will be running on `http://localhost:3030`\n\n## API Endpoints\n\n```http\nPOST /send-email\n```\n\nSends an email using the details provided in the request body.\n\n## Request Body Example\n\n```json\n{\n  \"name\": \"John Doe\",\n  \"email\": \"johndoe@example.com\",\n  \"subject\": \"Test Email\",\n  \"message\": \"Hello, this is a test email!\",\n  \"to\": \"recipient@example.com\"\n}\n```\n\n## Request Body Parameters\n\n- `name`: The sender's name\n- `email`: The sender's email address\n- `subject`: The email subject\n- `message`: The email content\n- `to`: The recipient's email address (required)\n\n## Docker Support\n\nYou can run this service using Docker. Follow these steps:\n\n### Building the Docker Image\n\n```bash\n# Build the image\ndocker build -t express-mail-service .\n```\n\n### Running with Docker\n\nThere are two ways to run the container:\n\n#### Option 1: Using command line arguments\n\n```bash\ndocker run -d \\\n  -p 3030:3030 \\\n  -e SMTP_HOST=smtp.gmail.com \\\n  -e SMTP_PORT=587 \\\n  -e SMTP_USER=your_email@gmail.com \\\n  -e SMTP_PASS=your_app_password \\\n  --name mail-service \\\n  express-mail-service\n```\n\n#### Option 2: Using environment file\n\n```bash\n# Create a .env file with your settings first, then:\ndocker run -d \\\n  -p 3030:3030 \\\n  --env-file .env \\\n  --name mail-service \\\n  express-mail-service\n```\n\n### Docker Commands Reference\n\n```bash\n# Stop the container\ndocker stop mail-service\n\n# Start the container\ndocker start mail-service\n\n# Remove the container\ndocker rm mail-service\n\n# View logs\ndocker logs mail-service\n\n# View container status\ndocker ps\n```\n\nThe service will be accessible at `http://localhost:3030` when running in Docker.\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldotobing%2Fexpress-mail-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faldotobing%2Fexpress-mail-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldotobing%2Fexpress-mail-service/lists"}