PHP code example of mailcare / codeception-module-mailcare

1. Go to this page and download the library: Download mailcare/codeception-module-mailcare library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mailcare / codeception-module-mailcare example snippets


$I->seeEmailCount(2, [
    'inbox' => '[email protected]',
    'sender' => '[email protected]',
    'subject' => 'Welcome John!',
    'since' => 'PT2M',
], 30);

$I->seeEmail([
    'inbox' => '[email protected]',
    'sender' => '[email protected]',
    'subject' => 'Welcome John!',
    'since' => 'PT2M',
], 30);

$I->dontSeeEmail([
    'inbox' => '[email protected]',
    'since' => 'PT2M',
], 30);

$I->grabLinksInLastEmail([
    'inbox' => '[email protected]',
    'since' => 'PT2M',
], 30);

$I->grabTextInLastEmail('#Password: (?<password>\S+)#', [
    'inbox' => '[email protected]',
    'subject' => 'Your credentials',
    'since' => 'PT2M',
], 30);