1. Go to this page and download the library: Download nettsite/nettmail-core 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/ */
nettsite / nettmail-core example snippets
use Nettsite\NettMail\Core\Drivers\ResendDriver;
use Nettsite\NettMail\Core\Mail\EmailAddress;
use Nettsite\NettMail\Core\Mail\EmailMessage;
use Nettsite\NettMail\Core\NettMail;
$nettmail = new NettMail(
new ResendDriver($apiKey, $httpClient, $requestFactory, $streamFactory),
$storage, // your StorageAdapterContract implementation
);
$result = $nettmail->send(new EmailMessage(
from: new EmailAddress('[email protected]', 'Sender'),
to: [new EmailAddress('[email protected]')],
subject: 'Hello',
html: '<p>Hello world</p>',
headers: ['List-Unsubscribe' => '<https://example.com/unsubscribe/abc>'],
));
$result->success; // bool
$result->messageId; // provider message id, normalized for webhook correlation
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.