{"id":37000963,"url":"https://github.com/johnatannvmd/codeception-mailchecker-module","last_synced_at":"2026-01-14T00:06:23.183Z","repository":{"id":57000866,"uuid":"48502070","full_name":"johnatannvmd/codeception-mailchecker-module","owner":"johnatannvmd","description":"Codeception MailChecker module. Was made for loving yours email acceptance tests.","archived":true,"fork":false,"pushed_at":"2018-01-16T06:55:38.000Z","size":283,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-29T20:38:25.461Z","etag":null,"topics":["codeception","mail","test"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/johnatannvmd.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}},"created_at":"2015-12-23T17:11:52.000Z","updated_at":"2023-01-28T02:06:29.000Z","dependencies_parsed_at":"2022-08-21T14:10:24.554Z","dependency_job_id":null,"html_url":"https://github.com/johnatannvmd/codeception-mailchecker-module","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/johnatannvmd/codeception-mailchecker-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnatannvmd%2Fcodeception-mailchecker-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnatannvmd%2Fcodeception-mailchecker-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnatannvmd%2Fcodeception-mailchecker-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnatannvmd%2Fcodeception-mailchecker-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnatannvmd","download_url":"https://codeload.github.com/johnatannvmd/codeception-mailchecker-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnatannvmd%2Fcodeception-mailchecker-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["codeception","mail","test"],"created_at":"2026-01-14T00:06:22.694Z","updated_at":"2026-01-14T00:06:23.172Z","avatar_url":"https://github.com/johnatannvmd.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codeception MailChecker Module\n\nThis repo is abandoned. Please use https://github.com/captbaritone/codeception-mailcatcher-module instead or any other similar project.\n\n[![Build Status](https://travis-ci.org/johnatannvmd/codeception-mailchecker-module.svg?branch=master)](https://travis-ci.org/johnatannvmd/codeception-mailchecker-module)\n[![Coverage Status](https://coveralls.io/repos/johnatannvmd/codeception-mailchecker-module/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/johnatannvmd/codeception-mailchecker-module?branch=master)\n\nThis module will let you test emails that are sent during your Codeception\nacceptance tests.\n\nIt was inspired by the https://github.com/captbaritone/codeception-mailcatcher-module and\nhttps://github.com/fetch/zend-mail-codeception-module/.\n\nIt supports several mail testing tools:\n\n* [MailCatcher](http://mailcatcher.me/)\n* [MailDump](https://github.com/ThiefMaster/maildump)\n* [ZendMail](https://github.com/zendframework/zend-mail)\n* [LatherMail](https://github.com/reclosedev/lathermail)\n* [MailHog](https://github.com/mailhog/MailHog)\n* [Mailtrap](https://mailtrap.io)\n* [Imap Server] included\n\n## Installation\n\nAdd the packages into your `composer.json`. For example we add Guzzle lib for MailCatcher\nfor MailDump provider:\n\n    {\n        \"require-dev\": {\n            \"codeception/codeception\": \"*\",\n            \"johnatannvmd/mailchecker-codeception-module\": \"1.*\"\n        }\n    } \n\nTell Composer to download the package:\n\n    php composer.phar update\n\nThen enable it in your `acceptance.suite.yml` configuration and set the url and\nport of your site's MailCatcher installation:\n\n    class_name: WebGuy\n    modules:\n        enabled:\n            - MailChecker\n        config:\n            MailChecker:\n                provider: MailCatcher\n                options:\n                    url: 'http://project.dev'\n                    port: '1080'\n\n## Optional Configuration\n\nIf you need to specify some special options (e.g. SSL verification or authentication\nheaders), you can set all of the allowed [Guzzle request options](http://docs.guzzlephp.org/en/latest/request-options.html):\n\n    class_name: WebGuy\n    modules:\n        enabled:\n            - MailChecker\n        config:\n            MailChecker:\n                provider: MailDump\n                options:\n                    url: 'http://project.dev'\n                    port: '1080'\n                    guzzleOptions:\n                        auth: ['yo', 'yo']\n\n## Example Usage\n\n    \u003c?php\n\n    $I = new WebGuy($scenario);\n    $I-\u003ewantTo('Get a password reset email');\n\n    // Cleared old emails from MailCatcher\n    $I-\u003eclearMailbox();\n\n    // Reset \n    $I-\u003eamOnPage('forgotPassword.php');\n    $I-\u003efillField(\"input[name='email']\", 'user@example.com');\n    $I-\u003eclick(\"Submit\");\n    $I-\u003esee(\"Please check your email\");\n\n    $I-\u003eseeInLastEmail(\"Please click this link to reset your password\");\n\n## Actions\n\n### clearMailbox\n\nClears the emails in providers's list. This is prevents seeing emails sent\nduring a previous test. You probably want to do this before you trigger any\nemails to be sent\n\nExample:\n\n    \u003c?php\n    // Clears all emails\n    $I-\u003eclearMailbox();\n    ?\u003e\n\n### seeInLastEmail\n\nChecks that an email contains a value. It searches the full raw text of the\nemail: headers, subject line, and body.\n\nExample:\n\n    \u003c?php\n    $I-\u003eseeInLastEmail('Thanks for signing up!');\n    ?\u003e\n\n* Param $text\n\n### seeInLastEmailTo\n\nChecks that the last email sent to an address contains a value. It searches the\nfull raw text of the email: headers, subject line, and body.\n\nThis is useful if, for example a page triggers both an email to the new user,\nand to the administrator.\n\nExample:\n\n    \u003c?php\n    $I-\u003eseeInLastEmailTo('user@example.com', 'Thanks for signing up!');\n    $I-\u003eseeInLastEmailTo('admin@example.com', 'A new user has signed up!');\n    ?\u003e\n\n* Param $email\n* Param $text\n\n### dontSeeInLastEmail\n\nChecks that an email does NOT contain a value. It searches the full raw\ntext of the email: headers, subject line, and body.\n\nExample:\n\n    \u003c?php\n    $I-\u003edontSeeInLastEmail('Hit me with those laser beams');\n    ?\u003e\n\n* Param $text\n\n### dontSeeInLastEmailTo\n\nChecks that the last email sent to an address does NOT contain a value.\nIt searches the full raw text of the email: headers, subject line, and body.\n\nExample:\n\n    \u003c?php\n    $I-\u003edontSeeInLastEmailTo('admin@example.com', 'But shoot it in the right direction');\n    ?\u003e\n\n* Param $email\n* Param $text\n\n### seeAttachmentFilenameInLastEmail\n\nChecks that the last email have attachment with following filename.\n\nExample:\n\n    \u003c?php\n    $I-\u003eseeAttachmentFilenameInLastEmail('expected_journey.ext');\n    ?\u003e\n\n* Param $expectedFilename\n\n### dontSeeAttachmentFilenameInLastEmail)\n\nChecks that the last email does NOT have attachment with following filename.\n\nExample:\n\n    \u003c?php\n    $I-\u003edontSeeAttachmentFilenameInLastEmail('unexpected_journey.ext');\n    ?\u003e\n\n* Param $unexpectedFilename\n\n### seeAttachmentFilenameInLastEmailTo\n\nChecks that the last sent to an address have attachment with following\nfilename.\n\nExample:\n\n    \u003c?php\n    $I-\u003eseeAttachmentFilenameInLastEmailTo('admin@example.com', 'expected_journey.ext');\n    ?\u003e\n\n* Param $address\n* Param $expectedFilename\n\n### dontSeeAttachmentFilenameInLastEmailTo\n\nChecks that the last sent to an address does NOT have attachment with\nfollowing filename.\n\nExample:\n\n    \u003c?php\n    $I-\u003edontSeeAttachmentFilenameInLastEmailTo('admin@example.com', 'unexpected_journey.ext');\n    ?\u003e\n\n* Param $address\n* Param $unexpectedFilename\n\n### seeAttachmentsCountInLastEmail\n\nAsserts that a certain number of attachments found in the last email.\n\nExample:\n\n    \u003c?php\n    $I-\u003eseeAttachmentsCountInLastEmail(1);\n    ?\u003e\n\n* Param $exected\n\n### seeAttachmentsCountInLastEmailTo\n\nAsserts that a certain number of attachments found in the last email to a\ngiven address.\n\nExample:\n\n    \u003c?php\n    $I-\u003eseeAttachmentsCountInLastEmailTo('admin@example.com', 1);\n    ?\u003e\n\n* Param $address\n* Param $expected\n\n### seeCcInLastEmail\n\nLook for the expected CC address in the last sent email.\n\nExample:\n\n    \u003c?php\n    $I-\u003eseeCcInLastEmail('cc@example.com');\n    ?\u003e\n\n* Param $expectedAddress\n\n### seeCcInLastEmailTo\n\nLook for the expected CC address in the last sent email to a given address.\n\nExample:\n\n    \u003c?php\n    $I-\u003eseeCcInLastEmailTo('admin@example.com', 'cc@example.com');\n    ?\u003e\n\n* Param $address\n* Param $expectedAddress\n\n### grabMatchesFromLastEmail\n\nExtracts an array of matches and sub-matches from the last email based on\na regular expression. It searches the full raw text of the email: headers,\nsubject line, and body. The return value is an array like that returned by\n`preg_match()`.\n\nExample:\n\n    \u003c?php\n    $matches = $I-\u003egrabMatchesFromLastEmail('@\u003cstrong\u003e(.*)\u003c/strong\u003e@');\n    ?\u003e\n\n* Param $regex\n\n### grabFromLastEmail\n\nExtracts a string from the last email based on a regular expression.\nIt searches the full raw text of the email: headers, subject line, and body.\n\nExample:\n\n    \u003c?php\n    $match = $I-\u003egrabFromLastEmail('@\u003cstrong\u003e(.*)\u003c/strong\u003e@');\n    ?\u003e\n\n* Param $regex\n\n### grabMatchesFromLastEmailTo\n\nExtracts an array of matches and sub-matches from the last email to a given\naddress based on a regular expression. It searches the full raw text of the\nemail: headers, subject line, and body. The return value is an array like that\nreturned by `preg_match()`.\n\nExample:\n\n    \u003c?php\n    $matchs = $I-\u003egrabMatchesFromLastEmailTo('user@example.com', '@\u003cstrong\u003e(.*)\u003c/strong\u003e@');\n    ?\u003e\n\n* Param $email\n* Param $regex\n\n### grabFromLastEmailTo\n\nExtracts a string from the last email to a given address based on a regular\nexpression.  It searches the full raw text of the email: headers, subject\nline, and body.\n\nExample:\n\n    \u003c?php\n    $match = $I-\u003egrabFromLastEmailTo('user@example.com', '@\u003cstrong\u003e(.*)\u003c/strong\u003e@');\n    ?\u003e\n\n* Param $email\n* Param $regex\n\n### seeEmailCount\n\nAsserts that a certain number of emails have been sent since the last time\n`clearMailbox()` was called.\n\nExample:\n\n    \u003c?php\n    $match = $I-\u003eseeEmailCount(2);\n    ?\u003e\n\n* Param $count\n\n# Docker\n\nNow you can build all modules at once by:\n```\ndocker-compose build\n```\n\n# License\n\nReleased under the same licence as Codeception: MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnatannvmd%2Fcodeception-mailchecker-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnatannvmd%2Fcodeception-mailchecker-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnatannvmd%2Fcodeception-mailchecker-module/lists"}