PHP code example of ericmartel / codeception-email

1. Go to this page and download the library: Download ericmartel/codeception-email 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/ */

    

ericmartel / codeception-email example snippets


getOpenedEmail($fetchNextUnread = FALSE)

$email_body = $I->grabBodyFromEmail('text/html');
$doc = new DOMDocument();
$doc->loadHTML($email_body);
$login = $doc->getElementById('login')->textContent;
$password = $doc->getElementById('password')->textContent;