Skip to content



composer require camuthig/courier-mailjet


Visit Mailjet to retrieve your API key and secret.


use Camuthig\Courier\Mailjet\MailjetCourier;
use Mailjet\Client;
use PhpEmail\EmailBuilder;
use PhpEmail\Content\SimpleContent;

$client = new Client(getenv('MAILJET_API_KEY'), getenv('MAILJET_API_SECRET'));
$courier = new MailjetCourier($client);

$email = EmailBuilder::email()
            ->withSubject('Great Email!')


Receipt ID

Mailjet returns a unique ID for each receipient of a message. However, the Courier receipt API expects a single ID to be returned for each email delivery. To work around this, the receipt ID returned by this implementation is actually added to the messages as the Custom ID property.