PHP code example of johnsn / guerrillamail
1. Go to this page and download the library: Download johnsn/guerrillamail 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/ */
johnsn / guerrillamail example snippets
uerrillaMail\GuerrillaConnect\CurlConnection;
use GuerrillaMail\GuerrillaMail;
//The first parameter is the client's IP.
//The second parameter is the client's Browser Agent.
//There is an optional third parameter to set the api endpoint
//There's an optional fourth parameter to set the site domain
//There's an optional fifth parameter to set the API key (only needed if site access is set private)
$connection = new CurlConnection("127.0.0.1", "GuerrillaMail_Library");
//The second parameter is the client's sid (optional)
$gm = new GuerrillaMail($connection);
//Obtain an email address
$response = $gm->get_email_address();
//Fetch user's latest emails.
$emails = $gm->check_email();