1. Go to this page and download the library: Download mattstein/unsend-php 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/ */
mattstein / unsend-php example snippets
// Initialize via factory
$unsend = \Unsend\Unsend::create('your-api-key', 'https://app.unsend.dev');
// Send an email
$response = $unsend->sendEmail([
'to' => '[email protected]',
'from' => '[email protected]',
'subject' => 'Library Test Email',
'html' => '<p>This is a test!</p>',
'text' => 'This is a test!'
]);
// Print email ID
echo $response->getData()->emailId;