This module provides Postmark email service integration for WebFramework.
- 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
- PHP 8.2 or higher
- Web Framework 8.x
- Postmark API key
Install via Composer:
composer require avoutic/web-framework-postmarkMake 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',
],
];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),
];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';MIT License - see LICENSE file for details