PHP code example of psyao / mailtester

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

    

psyao / mailtester example snippets



$I = new FunctionalTester($scenario);
$I->wantTo('send an email');

$I->amOnPage('/contact');

$I->fillField("Your Email", '[email protected]');
$I->click("Send Email");

$I->seeInLastEmail('Someone tried to get in touch with you!');
$I->seeLastEmailWasSentFrom('[email protected]');
$I->seeLastEmailWasSentTo('[email protected]');

$I->dontSeeInLastEmail('Foo');
$I->dontSeeLastEmailWasSentFrom('[email protected]');
$I->dontSeeLastEmailWasSentTo('[email protected]');