{"id":15552375,"url":"https://github.com/bahmutov/cypress-sendgrid-mailosaur-example","last_synced_at":"2025-09-29T00:32:55.294Z","repository":{"id":66012314,"uuid":"577954185","full_name":"bahmutov/cypress-sendgrid-mailosaur-example","owner":"bahmutov","description":"Sending and testing email flows example","archived":false,"fork":false,"pushed_at":"2025-09-24T02:15:41.000Z","size":288,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-24T04:12:28.445Z","etag":null,"topics":["cypress-example"],"latest_commit_sha":null,"homepage":"https://glebbahmutov.com/blog/cypress-mailosaur/","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/bahmutov.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-13T23:00:34.000Z","updated_at":"2024-10-12T18:45:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"c605e2db-d89f-42ed-8db1-ef53a09fff6a","html_url":"https://github.com/bahmutov/cypress-sendgrid-mailosaur-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bahmutov/cypress-sendgrid-mailosaur-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-sendgrid-mailosaur-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-sendgrid-mailosaur-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-sendgrid-mailosaur-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-sendgrid-mailosaur-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmutov","download_url":"https://codeload.github.com/bahmutov/cypress-sendgrid-mailosaur-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-sendgrid-mailosaur-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277450939,"owners_count":25819971,"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-09-28T02:00:08.834Z","response_time":79,"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":["cypress-example"],"created_at":"2024-10-02T14:18:04.630Z","updated_at":"2025-09-29T00:32:54.743Z","avatar_url":"https://github.com/bahmutov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cypress-sendgrid-mailosaur-example ![cypress version](https://img.shields.io/badge/cypress-12.8.1-brightgreen) [![ci](https://github.com/bahmutov/cypress-sendgrid-mailosaur-example/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/cypress-sendgrid-mailosaur-example/actions/workflows/ci.yml)\n\n\u003e Sending and testing email flows example\n\nRead 📝 [Testing Email Flow Using Cypress and Mailosaur](https://glebbahmutov.com/blog/cypress-mailosaur/) and [Minimize Mailosaur Use](https://glebbahmutov.com/blog/minimize-mailosaur-use/).\n\n- Sending emails via Sendgrid\n- Fetching sent emails using [cypress-mailosaur](https://github.com/mailosaur/cypress-mailosaur)\n- End-to-end testing using Cypress\n\n![Confirmation code email](./images/email.png)\n\n## Prerequisites\n\nSendGrid account with API key and a verified email sender, see [this doc](https://sendgrid.com/docs/for-developers/sending-email/quickstart-nodejs/). Similarly you need Mailosaur server ID and API key.\n\n## Install\n\n```shell\n$ npm install\n```\n\n## Run\n\nStart the server locally with injected `SENDGRID_API_KEY` and `SENDGRID_FROM` environment variables.\n\n```\nSENDGRID_API_KEY=... SENDGRID_FROM=... npm start\n```\n\n**Tip:** use [as-a](https://github.com/bahmutov/as-a) utility. Put the environment variables into `.as-a.ini` file and give it the same section name as the folder name.\n\n```ini\n; http://github.com/bahmutov/as-a\n[cypress-sendgrid-mailosaur-example]\n; sending emails\nSENDGRID_API_KEY=...\nSENDGRID_FROM=...\n; checking emails\nCYPRESS_MAILOSAUR_SERVER_ID=...\nCYPRESS_MAILOSAUR_API_KEY=...\n```\n\nStart the local application and open Cypress using [start-server-and-test](https://github.com/bahmutov/start-server-and-test) utility\n\n```text\n$ as-a . npm run local\n```\n\n## See also\n\n- 💻 [Full End-to-End Testing for Your HTML Email Workflows](https://slides.com/bahmutov/email-testing) presentation\n- 📝 [Testing email flows with Mailosaur](https://filiphric.com/testing-email-flows-with-mailosaur)\n\n## Small print\n\nAuthor: Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt; \u0026copy; 2022\n\n- [@bahmutov](https://twitter.com/bahmutov)\n- [glebbahmutov.com](https://glebbahmutov.com)\n- [blog](https://glebbahmutov.com/blog)\n- [videos](https://www.youtube.com/glebbahmutov)\n- [presentations](https://slides.com/bahmutov)\n- [cypress.tips](https://cypress.tips)\n- [Cypress Tips \u0026 Tricks Newsletter](https://cypresstips.substack.com/)\n- [my Cypress courses](https://cypress.tips/courses)\n\nLicense: MIT - do anything with the code, but don't blame me if it does not work.\n\nSupport: if you find any problems with this module, email / tweet /\n[open issue](https://github.com/bahmutov/cypress-sendgrid-mailosaur-example/issues) on Github\n\n## MIT License\n\nCopyright (c) 2022 Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt;\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-sendgrid-mailosaur-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmutov%2Fcypress-sendgrid-mailosaur-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-sendgrid-mailosaur-example/lists"}