{"id":17970399,"url":"https://github.com/janjaali/sendgrid-mock","last_synced_at":"2025-04-09T13:10:30.998Z","repository":{"id":39730886,"uuid":"168232729","full_name":"janjaali/sendGrid-mock","owner":"janjaali","description":"SendGrid-Mock serves as a simple server mocking the sendgrid-apis for development purposes.","archived":false,"fork":false,"pushed_at":"2024-10-20T15:39:02.000Z","size":1525,"stargazers_count":51,"open_issues_count":6,"forks_count":21,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T07:56:53.001Z","etag":null,"topics":["sendgrid"],"latest_commit_sha":null,"homepage":"https://cloud.docker.com/repository/docker/ghashange/sendgrid-mock/general","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/janjaali.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}},"created_at":"2019-01-29T21:34:30.000Z","updated_at":"2025-02-25T06:59:56.000Z","dependencies_parsed_at":"2024-04-15T20:28:39.123Z","dependency_job_id":"b7f3a171-575b-4297-a500-19b3a4cb6b6a","html_url":"https://github.com/janjaali/sendGrid-mock","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjaali%2FsendGrid-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjaali%2FsendGrid-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjaali%2FsendGrid-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjaali%2FsendGrid-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janjaali","download_url":"https://codeload.github.com/janjaali/sendGrid-mock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045245,"owners_count":21038554,"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":["sendgrid"],"created_at":"2024-10-29T15:05:12.571Z","updated_at":"2025-04-09T13:10:30.981Z","avatar_url":"https://github.com/janjaali.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SendGrid-Mock\n\nSendGrid-Mock serves as a simple server mocking the sendgrid-apis for development purposes.\n\n![./assets/screenshot_1.8.0.png](./assets/screenshot_1.8.0.png)\n\n## Functionalities\n\n### HTTP API\n\n* Send mails `POST /v3/mail/send`\n\n* Retrieve sent mails `GET /api/mails`\n  * Filter capabilities are included and can be combined:\n    * **To**: `GET /api/mails?to=email@address.com`\n    * **Subject**:\n      * `GET /api/mails?subject=The subject` (*exact match*)\n      * `GET /api/mails?subject=%subject%` (*contains*)\n    * **Datetime**: `GET /api/mails?dateTimeSince=2020-12-06T10:00:00Z` (\n      *[ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601)*)\n\n* Delete sent mails `DELETE /api/mails`\n  * Filter capabilities are included and can be combined:\n    * **To**: `DELETE /api/mails?to=email@address.com`\n\n### UI\n\n* Retrieve sent mails and display them\n* Delete sent mails\n\n### Extras\n\n* Basic authentication support: Add basic authentication credentials by specifying environment variable `AUTHENTICATION` to the following format: `user1:passwordForUser1;user2:passwordForUser2`. This applies only to the static content.\n\n* API key support: Add API key authentication by specifying environment variable `API_KEY`. This applies only to the API endpoints.\n\n* Request rate limiting: Both the actual SendGrid API server as well as the SSL server can be rate limited by specifying environment variables:\n  * `RATE_LIMIT_ENABLED`: `true` or `false` (default)\n  * `RATE_LIMIT_WINDOW_IN_MS`: The time window in milliseconds (default: `60000`)\n  * `RATE_LIMIT_MAX_REQUESTS`: The maximum number of requests allowed in the time window (default: `100`)\n  * `SSL_RATE_LIMIT_ENABLED`: `true` or `false` (default)\n  * `SSL_RATE_LIMIT_WINDOW_IN_MS`: The time window in milliseconds (default: `60000`)\n  * `SSL_RATE_LIMIT_MAX_REQUESTS`: The maximum number of requests allowed in the time window (default: `100`)\n\n* By default, all emails older than 24 hours will be deleted. This can be configured using environment variable `MAIL_HISTORY_DURATION` which uses [ISO-8601 Duration format](https://en.wikipedia.org/wiki/ISO_8601#Durations) such as *'PT24H'*.\n\n* Event support: Add basic [event](https://www.twilio.com/docs/sendgrid/for-developers/tracking-events/event#events) support by specifying the environment variable `EVENT_DELIVERY_URL`. When set, [delivered](https://www.twilio.com/docs/sendgrid/for-developers/tracking-events/event#delivered) events will be sent to the specified webhook URL when an email is sent.\n\n## Dockerized\n\nThe SendGrid-Mock server and the UI are both contained in the same docker-image which you can pull from [Docker Hub](https://cloud.docker.com/u/ghashange/repository/docker/ghashange/sendgrid-mock) and start it via:\n\n```shell\ndocker run -it -p 3000:3000 -e \"API_KEY=sendgrid-api-key\" ghashange/sendgrid-mock:1.12.0\n```\n\nSome prepared HTTP calls can be found [here](./http-calls).\n\nThe UI can be accessed at \u003chttp://localhost:3000\u003e.\n\n### SSL support\n\nSendGrid-Mock also supports SSL using [Let's Encrypt](https://letsencrypt.org/). To enable SSL, run it as follows:\n\n```shell\ndocker run -it -p 3000:3000 -e \"API_KEY=sendgrid-api-key\" -e \"CERT_DOMAINNAMES=[your-domain-name]\" -e \"CERT_EMAIL=[your-email-address]\" ghashange/sendgrid-mock:1.12.0\n```\n\n## Development\n\nSetup with `npm ci` and start both server and UI concurrently with `npm run dev`. Per default the server is reachable via \u003chttp://localhost:3000\u003e and the UI via \u003chttp://localhost:1234\u003e.\n\nSome prepared HTTP calls can be found [here](./http-calls).\n\nThe UI can be accessed at \u003chttp://localhost:3000\u003e.\n\n### Build\n\nCreate docker image with `docker build -t ghashange/sendgrid-mock:1.12.0 .`.\n\n### Release\n\n1. Update version number in [package.json](./package.json), [version file](./version) and [README](./README.md)\n\n2. Create PR against **master** branch\n\n3. Merge PR\n\n4. Create GitHub release and update [Docker Hub description](https://hub.docker.com/repository/docker/ghashange/sendgrid-mock)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanjaali%2Fsendgrid-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanjaali%2Fsendgrid-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanjaali%2Fsendgrid-mock/lists"}