PHPackages                             avoutic/web-framework-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. [Framework](/categories/framework)
4. /
5. avoutic/web-framework-postmark

ActiveLibrary[Framework](/categories/framework)

avoutic/web-framework-postmark
==============================

The Postmark module for web-framework

3.0.1(6mo ago)01.3kMITPHPCI passing

Since May 23Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/avoutic/web-framework-postmark)[ Packagist](https://packagist.org/packages/avoutic/web-framework-postmark)[ Docs](https://web-framework.com)[ RSS](/packages/avoutic-web-framework-postmark/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

Web Framework Postmark Module
=============================

[](#web-framework-postmark-module)

This module provides Postmark email service integration for WebFramework.

Features
--------

[](#features)

- Send raw emails via Postmark
- Send template-based emails via Postmark
- Automatic instrumentation for email sending
- Configurable default sender email
- Error handling for common Postmark API issues

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Web Framework 8.x
- Postmark API key

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

[](#installation)

Install via Composer:

```
composer require avoutic/web-framework-postmark
```

Make sure the definitions file is included in your project by adding it to `definition_files` in your `config.php` file:

```
return [
    'definition_files' => [
        '../vendor/avoutic/web-framework/definitions/definitions.php',
        '../vendor/avoutic/web-framework-postmark/definitions/definitions.php',
        'app_definitions.php',
    ],
];
```

Usage
-----

[](#usage)

The module provides Postmark integration for WebFramework, enabling email sending. It implements the WebFramework MailService and MailBackend interfaces to send emails.

To use Postmark for email sending you need to add it in your PHP-DI definitions:

```
return [
    MailService::class => DI\autowire(PostmarkMailService::class),
    MailBackend::class => DI\autowire(PostmarkMailService::class),
];
```

Configuration
-------------

[](#configuration)

If you are using the definition from *definitions/defitinions.php*. You can just add the following *postmark.php* to your auth config directory (*config/auth*):

```
