1. Go to this page and download the library: Download emailit/emailit-sdk 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/ */
emailit / emailit-sdk example snippets
use EmailIt\EmailItClient;
$client = new EmailItClient('your_api_key');
use EmailIt\EmailItClient;
$client = new EmailItClient('your_api_key');
use EmailIt\EmailItClient;
$client = new EmailItClient('your_api_key');
$email = $client->email();
$email->from('[email protected]')
->to('[email protected]')
->replyTo('[email protected]')
->subject('Test Email')
->html('<h1>Hello, World!</h1>')
->text('This is a test email.')
->send();
$email = $client->email();
$email->from('[email protected]')
->to('[email protected]')
->replyTo('[email protected]')
->subject('Test Email')
->html('<h1>Hello, World!</h1>')
->text('This is a test email.')
->addAttachment('file.pdf', $fileContent, 'application/pdf')
->addHeader('X-Custom-Header', 'Value')
->send();