PHP code example of rezouce / codeception-mailcatcher
1. Go to this page and download the library: Download rezouce/codeception-mailcatcher 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/ */
rezouce / codeception-mailcatcher example snippets
// Check if there is at least an email
$this->hasEmails();
// Count the number of mails
$this->seeNumberEmails(5);
// Check if at least an email contains a string in its source
$this->seeInEmail('A string.');
$emails = $this->getEmailsBySubject('subject');
$emails = $this->getEmailsBySender('[email protected]');
$emails = $this->getEmailsByRecipients(['[email protected]']);
$emails = $this->getEmailsBySubject('subject');
$this->hasEmails($emails);