1. Go to this page and download the library: Download ingenerator/mailhook 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/ */
ingenerator / mailhook example snippets
$mailhook = new \Ingenerator\Mailhook\Mailhook('/tmp/outgoing_mail.dump');
// You'll usually want to purge the file before your tests, to ensure you have a clean state
$mailhook->purge();
run_my_code_that_should_send_emails();
$mailhook->refresh();
$mails = $mailhook->getEmails();
assert(count($mails) === 1, 'An email was sent');