PHPackages                             laraben/laravel-postmark - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. laraben/laravel-postmark

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

laraben/laravel-postmark
========================

Laravel package for sending mail via the Postmark API

v2.5.0(6y ago)022MITPHPPHP &gt;=7.1.3

Since Jan 29Pushed 6y agoCompare

[ Source](https://github.com/laraben/laravel-postmark)[ Packagist](https://packagist.org/packages/laraben/laravel-postmark)[ Docs](https://github.com/coconutcraig/laravel-postmark)[ RSS](/packages/laraben-laravel-postmark/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (38)Used By (0)

[![Postmark](https://camo.githubusercontent.com/bc1bd67d420c959e59946436cc159be4443e56c4620a1287d9b1c49748a982d6/68747470733a2f2f706f73746d61726b6170702e636f6d2f696d616765732f6c6f676f2e737667)](https://postmarkapp.com)

Laravel Postmark
================

[](#laravel-postmark)

\[!\[Latest Version on Packagist\]\[ico-version\]\]\[link-packagist\] [!\[Software License\]\[ico-license\]](LICENSE.md)\[!\[Build Status\]\[ico-travis\]\]\[link-travis\] \[!\[Coverage Status\]\[ico-scrutinizer\]\]\[link-scrutinizer\] \[!\[Quality Score\]\[ico-code-quality\]\]\[link-code-quality\] \[!\[Total Downloads\]\[ico-downloads\]\]\[link-downloads\]

> [Postmark](https://postmarkapp.com) is the easiest and most reliable way to be sure your important transactional emails get to your customer's inbox.

Upgrading
---------

[](#upgrading)

Please see [UPGRADE](UPGRADE.md) for details.

Installation
------------

[](#installation)

You can install the package via composer:

```
$ composer require laraben/laravel-postmark
```

The package will automatically register itself.

You can optionally publish the config file with:

```
php artisan vendor:publish --provider="Coconuts\Mail\PostmarkServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Update your `.env` file by adding your server key and set your mail driver to `postmark`.

```
MAIL_DRIVER=postmark
POSTMARK_SECRET=YOUR-SERVER-KEY-HERE
```

That's it! The mail system continues to work the exact same way as before and you can switch out Postmark for any of the pre-packaged Laravel mail drivers (smtp, mailgun, log, etc...).

> Remember, when using Postmark the sending address used in your emails must be a [valid Sender Signature](http://support.postmarkapp.com/category/45-category) that you have already configured.

Postmark Templates
------------------

[](#postmark-templates)

Postmark offers a fantastic templating service for you to utilize instead of maintaining your templates within your Laravel application. If you would like to take advantage of that, this package offers an extension on the base `MailMessage` provided out of the box with Laravel. Within a Laravel notification, you can do the following to start taking advantage of Postmark templates.

```
public function toMail($notifiable)
{
    return (new \Coconuts\Mail\MailMessage)
        ->identifier(8675309)
        ->include([
            'name' => 'Customer Name',
            'action_url' => 'https://example.com/login',
        ]);
}
```

> You may also utilize an alias instead of the template identifier by using the `->alias()` method.

Postmark Tags
-------------

[](#postmark-tags)

If you rely on categorizing your outgoing emails using Tags in Postmark, you can simply add a header within your Mailable class's build method.

```
public function build()
{
    $this->withSwiftMessage(function (\Swift_Message $message) {
        $message->getHeaders()->addTextHeader('tag', 'value');
    });
}
```

Postmark Metadata
-----------------

[](#postmark-metadata)

Similar to tags, you can also include [metadata](https://postmarkapp.com/support/article/1125-custom-metadata-faq) by adding a header. Metadata headers should be prefixed with `metadata-` where the string that follows is the metadata key.

```
public function build()
{
    $this->withSwiftMessage(function (\Swift_Message $message) {
        $message->getHeaders()->addTextHeader('metadata-field', 'value');
        $message->getHeaders()->addTextHeader('metadata-another-field', 'another value');
    });
}
```

In this case, the following object will be sent to Postmark as metadata.

```
{
    "field": "value",
    "another-field", "another value"
}

```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- Laraben
- \[Craig Paul\]\[link-author\]
- \[All Contributors\]\[link-contributors\]

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~37 days

Total

35

Last Release

2479d ago

Major Versions

v0.2.1 → v1.0.02017-03-25

1.0.x-dev → v2.0.02017-07-17

PHP version history (3 changes)v0.0.1PHP ~7.0

v2.1.0PHP &gt;=7.0

v2.2.0PHP &gt;=7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/62f13b84f80292f5ceb7a5125e3d368490a0173420d5df637406e200c6721fd7?d=identicon)[LARABEN](/maintainers/LARABEN)

---

Top Contributors

[![coconutcraig](https://avatars.githubusercontent.com/u/25390158?v=4)](https://github.com/coconutcraig "coconutcraig (110 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (42 commits)")[![laraben](https://avatars.githubusercontent.com/u/34068668?v=4)](https://github.com/laraben "laraben (10 commits)")[![julesjanssen](https://avatars.githubusercontent.com/u/492036?v=4)](https://github.com/julesjanssen "julesjanssen (1 commits)")[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (1 commits)")[![sheldonreiff](https://avatars.githubusercontent.com/u/8636551?v=4)](https://github.com/sheldonreiff "sheldonreiff (1 commits)")

---

Tags

laravelmailemailpostmarkwildbitcoconutcraig

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/laraben-laravel-postmark/health.svg)

```
[![Health](https://phpackages.com/badges/laraben-laravel-postmark/health.svg)](https://phpackages.com/packages/laraben-laravel-postmark)
```

###  Alternatives

[coconutcraig/laravel-postmark

Laravel package for sending mail via the Postmark API

2152.9M1](/packages/coconutcraig-laravel-postmark)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
