1. Go to this page and download the library: Download lettermint/lettermint-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/ */
lettermint / lettermint-php example snippets
$lettermint = new Lettermint\Lettermint('your-api-token');
$response = $lettermint->email
->from('[email protected]')
->to('[email protected]')
->subject('Hello from Lettermint!')
->text('Hello! This is a test email.')
->send();
$response = $email->send([
'from' => '[email protected]',
'to' => ['[email protected]'],
'subject' => 'Hello from Lettermint!',
'text' => 'Hello! This is a test email.',
]);
$response = $lettermint->email
->from('[email protected]')
->to('[email protected]')
->subject('Hello from Lettermint!')
->text('Hello! This is a test email.')
->idempotencyKey('unique-request-id-123')
->send();