accord/postmark-swiftmailer-bundle
Symfony2 bundle adding a Postmark transport for SwiftMailer. Configure your Postmark API key (and optional SSL) and set Swiftmailer transport to accord_postmark to send email through Postmark.
'mail' => [
'driver' => 'postmark',
'api_key' => env('POSTMARK_API_KEY'),
]
This bundle offers no unique value over Laravel’s built-in solution.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony2 EOL | Critical | Avoid; use Laravel’s native Postmark driver. |
| SwiftMailer Abstraction | High | Requires custom adapter layer for Laravel Mail. |
| Config Incompatibility | High | Manual mapping of Symfony2 YAML to Laravel’s config/mail.php. |
| Deprecated APIs | Medium | Bundle may rely on Symfony2 components no longer maintained. |
| No Laravel Support | Blocking | No service provider, no Facade integration. |
ShouldQueue interface).Option 1: Replace with Laravel’s Native Postmark Driver (Recommended)
config/mail.php:
'driver' => 'postmark',
'api_key' => env('POSTMARK_API_KEY'),
Option 2: Custom SwiftMailer Transport Adapter (High Effort)
SwiftmailerTransport to use the bundle’s transport.config/mail.php.// app/Providers/AppServiceProvider.php
public function register()
{
$this->app->singleton(Swift_Transport::class, function () {
return new \Accord\PostmarkSwiftMailerBundle\Transport\PostmarkTransport(
config('mail.postmark.api_key'),
config('mail.postmark.use_ssl', true)
);
});
}
Option 3: Fork & Modernize (Not Recommended)
| Component | Compatibility | Notes |
|---|---|---|
| Laravel Mail | ❌ No | Uses Symfony Mailer, not SwiftMailer. |
| SwiftMailer | ⚠️ Partial | Requires custom transport wrapper. |
| Symfony 5/6 | ❌ No | Bundle targets Symfony2. |
| Postmark API | ✅ Yes | Transport is Postmark-compatible. |
config.yml (Laravel uses .env).ShouldQueue.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Bundle API Key Leak | Critical (security) | Use Laravel’s .env instead of config.yml. |
| SwiftMailer Deprecation | Critical | Migrate to Symfony Mailer or Laravel’s Mail. |
| Postmark API Outage | High | Implement fallback to SMTP in Laravel’s mail.php. |
| Symfony2 Dependency Conflict | High | Isolate in a micro-service or avoid. |
| No Error Handling | Medium | Add custom exception handling for Postmark failures. |
How can I help you explore Laravel packages today?