PHP code example of kristiani / email-roundtrip-monitor

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

    

kristiani / email-roundtrip-monitor example snippets


\Roundtripmonitor\Config::$receiverEmail = '[email protected]';

\Roundtripmonitor\Send::email(function($toName, $toEmail, $fromName, $fromEmail, $subject, $body) {
    yourEmailFunction($toName, $toEmail, $fromName, $fromEmail, $subject, $body);
});

\Roundtripmonitor\Config::server('imap.host.com', 143, 'imapUsername', 'imapPassword', 'INBOX');
\Roundtripmonitor\Confirm::emailOrFail();

try {
    \Roundtripmonitor\Config::server('imap.host.com', 143, 'imapUsername', 'imapPassword', 'INBOX');
    \Roundtripmonitor\Confirm::email();
} catch (\Exception $ex) {
    // do something about it
}

\Roundtripmonitor\Config::$alertThresholdTime = 900;