symfony/postmark-mailer
Symfony Mailer bridge for Postmark. Send email via Postmark using SMTP or the API by setting a postmark DSN (postmark+smtp://TOKEN@default or postmark+api://TOKEN@default). Provides seamless Postmark integration in Symfony apps.
postmark+smtp://, postmark+api://) allows for minimal Laravel-specific changes. Can be wrapped in a custom transport class to bridge Symfony’s Mailer with Laravel’s Mail facade.Mailable classes to Symfony’s Email objects.bug #63993).symfony/mailer as a composer dependency (not a full Symfony app).SwiftmailerTransport to support the Postmark DSN (postmark+smtp://, postmark+api://).POST /send-email).symfony/postmark-mailer.Email class.Mailable classes to use Symfony’s Email objects.bug #64341).composer require symfony/mailer postmark/php-sdk
// app/Mail/PostmarkTransport.php
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mailer\Transport\Dsn;
class PostmarkTransport extends AbstractTransport {
public function __construct(Dsn $dsn) {
parent::__construct($dsn);
}
// Implement send() using Postmark API/SMTP
}
// config/mail.php
'transports' => [
'postmark' => [
'dsn' => env('MAILER_DSN', 'postmark+api://KEY@default'),
],
],
// Use Symfony's Email class or extend Laravel's Mailable
use Symfony\Component\Mime\Email;
class OrderShipped extends Mailable {
public function build() {
return $this->subject('Your order is on the way!')
->view('emails.order-shipped')
->with(['order' => $this->order]);
}
}
^6.4).--env=debug).| Failure Scenario | Impact | **
How can I help you explore Laravel packages today?