Skip to content



composer require camuthig/courier-postmark


The Postmark courier supports both templated and simple emails.

To create a Postmark courier, you should follow the steps documented in the Postmark PHP docs to create a client and pass it into the PostmarkCourier.


use Camuthig\Courier\Postmark\PostmarkCourier;
use GuzzleHttp\Client;
use PhpEmail\Content\TemplatedContent;
use PhpEmail\EmailBuilder;
use Postmark\PostmarkClient;

new Client();

$courier = new PostmarkCourier(new PostmarkClient('MY_KEY'));

$email = EmailBuilder::email()
    ->replyTo('', 'Your Sales Rep')
    ->withContent(new TemplatedContent('my_email', ['testKey' => 'value']))


Notes for Postmark Templates

Implicit Template Variables

Postmark allows users to define template keys in the subject of templated emails. To support this functionality, the courier will pass the subject of the Email into the template variables with the key subject.

BCC Recipients

Postmark does not support sending emails with a BCC recipients list. Courier does not throw an error when sending emails with a BCC using the Postmark courier, but it is important to note that the email will just not be delivered to the given email addresses.