- How do I install and configure openbuildings/postmark in Laravel for Postmark email delivery?
- Install via Composer with `composer require openbuildings/postmark`, then update your `config/mail.php` to set the `driver` to `postmark` and add your API key under the `postmark` array. No additional Laravel-specific setup is needed beyond the standard Mail facade configuration.
- Does this package support Laravel 10 or newer versions?
- The package was last updated in 2021 and may not fully support Laravel 10’s Swift Mailer 6.x+ dependencies. Test thoroughly in a staging environment, or consider alternatives like `spatie/laravel-postmark` for newer Laravel versions.
- Can I use Postmark’s sandbox mode for testing emails without sending real messages?
- Yes, Postmark’s sandbox mode is fully compatible with this package. Configure your API key in the sandbox environment (e.g., `POSTMARK_SANDBOX_API_KEY`) and set the `postmark` transport to use it during development.
- Will this package work with Laravel’s queued mail system (Mail::later) for async sending?
- Yes, the package integrates with Laravel’s queue system. When using `Mail::later()`, emails will be sent asynchronously via Postmark’s API, leveraging Laravel’s queue workers for reliability.
- Are there any limitations with attachments, HTML emails, or CC/BCC in this package?
- The package fully supports attachments, HTML emails, and CC/BCC fields. It also allows sending multiple emails in a single API call, matching Postmark’s native capabilities. Test with complex emails to ensure compatibility.
- What happens if Postmark’s API goes down? Can I fall back to SMTP?
- This package does not include built-in fallback logic. If Postmark’s API is unavailable, emails will fail silently. For redundancy, consider using a hybrid setup with conditional logic in your mail handlers or a dedicated backup transport.
- How do I handle Postmark API errors or rate limits in my Laravel application?
- Postmark’s API returns HTTP status codes for errors (e.g., 429 for rate limits). Wrap your mail calls in a try-catch block to log or retry failed sends. The package does not include retry logic, so implement it at the application level if needed.
- Is this package actively maintained? Should I look for alternatives like spatie/laravel-postmark?
- The package has not been updated since 2021, so maintenance risks exist. For newer Laravel versions or active support, consider `spatie/laravel-postmark`, which is more actively maintained and Laravel-specific.
- Can I use this package outside Laravel, e.g., in a standalone PHP/Symfony project?
- Yes, the package is a Swift Mailer transport and can be used in any PHP application using Swift Mailer. Symfony 2+ projects can integrate it via service configuration, as shown in the README.
- How do I monitor email deliverability or track open rates with this package?
- Postmark provides built-in analytics for deliverability, open rates, and clicks. Use Postmark’s webhooks or their API to fetch metrics. The package itself does not include tracking logic, but you can integrate Postmark’s tracking features via their dashboard or API.