particleflux / codeception-email
Email Module for codeception
Package info
codeberg.org/particleflux/codeception-email
pkg:composer/particleflux/codeception-email
0.0.1
2026-07-24 19:07 UTC
Requires
- php: ^8.2 || ^8.3 || ^8.4 || ^8.5
- codeception/codeception: ^5.0
- zbateson/mail-mime-parser: ^4.0
Requires (Dev)
- codeception/module-asserts: ^3.3
- phpcompatibility/php-compatibility: 10.0.0-alpha2
- phpstan/phpstan: ^2.2
- squizlabs/php_codesniffer: ^3.13
This package is not auto-updated.
Last update: 2026-07-25 15:30:09 UTC
README
A helper to test emails sent during Codeception tests.
No mailcatcher or mailtrap needed, relies on existing modules
grabLastSentEmail(). Or, theoretically, you can just pass in raw mails from
wherever.
Installation
composer require --dev particleflux/codeception-email
Usage
Enable the module in your codeception suite, e.g.:
modules:
enabled:
- Asserts
- particleflux\Codeception\Module\Email
- Yii2
Example usage:
$I->seeEmailIsSent(); // from yii2 module
// grabLastSentEmail() is yii2 module
$I->openMail((string) $I->grabLastSentEmail());
$I->seeInTo('tester2@hackthe.codes');
$I->seeSubjectContains('Verify your email');
$I->seeTextBodyContains("/site/verify-email?token=12345");