avoutic/web-framework-postmark

The Postmark module for web-framework

Installs: 1 039

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/avoutic/web-framework-postmark

3.0.1 2025-11-07 12:10 UTC

This package is auto-updated.

Last update: 2025-11-07 12:11:17 UTC


README

This module provides Postmark email service integration for WebFramework.

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

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

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

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

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):

<?php

return 'your-api-key-here';

License

MIT License - see LICENSE file for details