Skip to content

[2.x] add Postmark driver #4442

@imorland

Description

@imorland

Postmark Mail Driver

The symfony/postmark-mailer bridge is already a dependency of flarum/core but we have never exposed a PostmarkDriver to match.

What needs doing

  • Add src/Mail/PostmarkDriver.php implementing DriverInterface
    • Settings: mail_postmark_token (Server Token), optionally mail_postmark_message_stream
    • buildTransport() creates a PostmarkApiTransport via PostmarkTransportFactory
  • Register the driver in MailServiceProvider ('postmark' => PostmarkDriver::class)
  • Add locale keys to core.yml (mail_postmark_token_label, postmark_heading, postmark_description, etc.)
  • Unit tests mirroring MailgunDriverTest
  • Update integration test in MailTest.php

Why core and not a FoF extension?

The dep is already present — adding the driver is essentially free. Postmark is a widely-used transactional mail provider with first-party support in Laravel itself, and the pattern is identical to the existing Mailgun driver.

References

  • Symfony bridge: symfony/postmark-mailer
  • Existing pattern: src/Mail/MailgunDriver.php

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions