PHP code example of ahmedghanem00 / tempmail-api-client
1. Go to this page and download the library: Download ahmedghanem00/tempmail-api-client 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/ */
ahmedghanem00 / tempmail-api-client example snippets
use ahmedghanem00\TempMailClient\Client;
$client = new Client('YOUR_API_TOKEN');
$client->retrieveMailDomains();
$client->getCachedMailDomains();
$receiver = $client->generateFullyRandomReceiver();
## OR
$receiver = $client->generateRandomReceiverFromEmailName("my-random-email");
echo $receiver->getFullEmailAddress(); // string "[email protected]" OR "[email protected]"
echo $receiver->getEmailName(); // string "bdmhnjbtyj" OR "my-random-email"
echo $receiver->getEmailDomain(); // string "nuclene.com"