1. Go to this page and download the library: Download flysend/flysend-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/ */
flysend / flysend-php example snippets
use FlySend\FlySend;
$flysend = new FlySend('your-api-key');
$response = $flysend->emails->send([
'from' => '[email protected]',
'to' => '[email protected]',
'subject' => 'Welcome!',
'html' => '<p>Hello world!</p>',
]);
echo $response['data']['id']; // email ID
$flysend = new FlySend(
apiKey: 'your-api-key',
baseUrl: 'https://api.flysend.co', // optional, for self-hosted instances
timeout: 30, // optional, default 30s
);