{"id":18818681,"url":"https://github.com/mailosaur/cypress-mailosaur","last_synced_at":"2026-02-17T13:03:09.938Z","repository":{"id":37751687,"uuid":"264733748","full_name":"mailosaur/cypress-mailosaur","owner":"mailosaur","description":"Mailosaur email and SMS testing commands for Cypress","archived":false,"fork":false,"pushed_at":"2025-01-24T08:35:06.000Z","size":2183,"stargazers_count":85,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T09:43:29.826Z","etag":null,"topics":["cypress","email","email-testing","end-to-end-testing","qa","qaautomation","sms","testing-tools"],"latest_commit_sha":null,"homepage":"https://mailosaur.com/docs/frameworks-and-tools/cypress/","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/mailosaur.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":"2020-05-17T18:44:18.000Z","updated_at":"2025-09-08T15:32:34.000Z","dependencies_parsed_at":"2024-05-02T05:39:24.749Z","dependency_job_id":"f2644cd7-bc93-4a1a-8671-16a3d18cef2d","html_url":"https://github.com/mailosaur/cypress-mailosaur","commit_stats":{"total_commits":103,"total_committers":6,"mean_commits":"17.166666666666668","dds":"0.058252427184465994","last_synced_commit":"47f8633e510c03b3a1581174d4b223e72b17201f"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/mailosaur/cypress-mailosaur","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailosaur%2Fcypress-mailosaur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailosaur%2Fcypress-mailosaur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailosaur%2Fcypress-mailosaur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailosaur%2Fcypress-mailosaur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mailosaur","download_url":"https://codeload.github.com/mailosaur/cypress-mailosaur/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailosaur%2Fcypress-mailosaur/sbom","scorecard":{"id":612874,"data":{"date":"2025-08-11","repo":{"name":"github.com/mailosaur/cypress-mailosaur","commit":"da7ab6679a15a1bd0a5d5e694fdad4a0dafb6cb5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/mailosaur/cypress-mailosaur/publish.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:36","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:65","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:21","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   1 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"47 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T03:05:23.565Z","repository_id":37751687,"created_at":"2025-08-21T03:05:23.565Z","updated_at":"2025-08-21T03:05:23.565Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29322733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["cypress","email","email-testing","end-to-end-testing","qa","qaautomation","sms","testing-tools"],"created_at":"2024-11-08T00:17:45.609Z","updated_at":"2026-02-17T13:03:09.922Z","avatar_url":"https://github.com/mailosaur.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mailosaur Cypress Commands\n\n[![](https://github.com/mailosaur/cypress-mailosaur/workflows/CI/badge.svg)](https://github.com/mailosaur/cypress-mailosaur/actions)\n\n## Test email and SMS messages with Cypress\n\nUsing Cypress and Mailosaur together you can: \n- Test email, with unlimited test email addresses \n- Test SMS messages\n- Capture emails with your very own fake SMTP servers\n\n## What is Mailosaur?\n\n[Mailosaur](https://mailosaur.com) is a service that lets you automate email testing (e.g. email verification, password resets, etc.) and SMS testing (e.g. one-time passwords).\n\nMailosaur also provides dummy SMTP servers to test with; allowing you to catch email in staging environments - preventing email being sent to customers by mistake.\n\n## ⚠️ Important: Cypress 15+ Required\n\n**Version 4.0.0+ of this plugin requires Cypress 15.0.0 or later** due to the migration from `Cypress.env` to `cy.env` (the former being deprecated in Cypress 15 and removed in Cypress 16).\n\nIf you're using Cypress 14 or earlier, please use version 3.x of this plugin:\n```sh\nnpm i -D cypress-mailosaur@3\n```\n\n## How do I test email with Cypress?\n\nFollow these steps to start testing email with Cypress:\n\n### Step 1 - Installation\n\nInstall the Mailosaur commands via `npm` or `yarn`:\n\n```sh\nnpm i -D cypress-mailosaur\n# or\nyarn add -D cypress-mailosaur\n```\n\nOnce downloaded, add the following line to `cypress/support/e2e.js` (or `cypress/support/index.js` in older versions of Cypress) to import the commands into your Cypress project:\n\n```js\nrequire('cypress-mailosaur');\n```\n\n### Step 2 - API Authentication\n\nMailosaur commands need your Mailosaur API key to work. You can learn about [managing API keys here](https://mailosaur.com/docs/managing-your-account/api-keys/).\n\n#### Add API key to `cypress.config.js` \n\n```js\nmodule.exports = defineConfig({\n  env: {\n    MAILOSAUR_API_KEY: \"your-key-here\",\n  },\n\n  // ...\n});\n\n```\n\n#### Alternatively, set API key via a system environment variable\n\nTo set the environment variable on your machine, it needs to be prefixed with either `CYPRESS_` or `cypress_`.\n\n```sh\nexport CYPRESS_MAILOSAUR_API_KEY=your-key-here\n```\n\n### Step 3 - Write your email test\n\nFor this example, we'll navigate to a password reset page, request a new password link (sent via email), and get that email.\n\nCreate a new test spec:\n\n```sh\ntouch cypress/e2e/password-reset.cy.js\n```\n\nNow edit the file to something like this:\n\n```js\ndescribe('Password reset', () =\u003e {\n    const serverId = 'abcd1234'\n    const serverDomain = 'abcd1234.mailosaur.net'\n    const emailAddress = 'password-reset@' + serverDomain\n\n    it('Makes a Password Reset request', () =\u003e {\n        cy.visit('https://github.com/password_reset')\n        cy.title().should('equal', 'Forgot your password?')\n        cy.get('#email_field').type(emailAddress)\n    })\n\n    it('Gets Password Reset email from Mailosaur', () =\u003e {\n        cy.mailosaurGetMessage(serverId, {\n            sentTo: emailAddress\n        }).then(email =\u003e {\n            expect(email.subject).to.equal('Reset your password');\n            passwordResetLink = email.text.links[0].href;\n        })\n    })\n\n    it('Follows the link from the email', () =\u003e {\n        const validPassword = 'delighted cheese jolly cloud'\n\n        cy.visit(passwordResetLink)\n        cy.title().should('contain', 'Change your password')\n        cy.get('#password').type(validPassword)\n        cy.get('#password_confirmation').type(validPassword)\n        cy.get('form').submit()\n    })\n})\n```\n\n### Step 4 - Write further test cases\n\nYou can test pretty much anything with Mailosaur and Cypress, including:\n\n- [Test the text content of an email](https://mailosaur.com/docs/test-cases/text-content/)\n- [Test links within an email](https://mailosaur.com/docs/test-cases/links/)\n- [Working with email attachments](https://mailosaur.com/docs/test-cases/attachments/)\n- [Handling images and web beacons](https://mailosaur.com/docs/test-cases/images/)\n- [Perform a spam test](https://mailosaur.com/docs/test-cases/spam/)\n\nFor more information, check out the full [Mailosaur docs](https://mailosaur.com/docs/frameworks-and-tools/cypress/) for the most up-to-date guides and troubleshooting tips.\n\n## How do I test SMS with Cypress?\n\nMailosaur Team, Premium, and Ultimate customers can perform SMS tests with Cypress, whilst Trial account users can just ask support to enable this feature to try it out!\n\nSMS testing works in just the same way as email testing above. However rather than dealing with email addresses, you search using phone numbers instead. For example:\n\n```js\ncy.mailosaurGetMessage(serverId, {\n    sentTo: '447555111222'\n}).then(sms =\u003e {\n    expect(sms.text.body).to.equal('Your OTP code is: 123456')\n})\n```\n\n## Development\n\nInstall all development dependencies:\n\n```sh\ncd test\nnpm i\ncd ../\nnpm i\n```\n\nThe test suite requires the following environment variables to be set:\n\n```sh\nexport CYPRESS_MAILOSAUR_API_KEY=your_api_key\nexport CYPRESS_MAILOSAUR_SERVER=server_id\n```\n\nRun all tests:\n\n```sh\nnpm test\n```\n\n## Contacting us\n\nYou can get us at [support@mailosaur.com](mailto:support@mailosaur.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailosaur%2Fcypress-mailosaur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailosaur%2Fcypress-mailosaur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailosaur%2Fcypress-mailosaur/lists"}