Skip to content

Commit

Permalink
feature #57903 [Mailer] Implement Postal mailer (jonasclaes)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 7.2 branch.

Discussion
----------

[Mailer] Implement Postal mailer

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT

This will implement the Postal mailer.

API docs: https://apiv1.postalserver.io/controllers/send/message.html

Docs: symfony/symfony-docs#20088

Commits
-------

db84ab3021 [Mailer] Implement Postal mailer
  • Loading branch information
fabpot committed Aug 11, 2024
2 parents 495f032 + b2720aa commit 8b2fb26
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Exception/UnsupportedSchemeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ class UnsupportedSchemeException extends LogicException
'class' => Bridge\Mailchimp\Transport\MandrillTransportFactory::class,
'package' => 'symfony/mailchimp-mailer',
],
'postal' => [
'class' => Bridge\Postal\Transport\PostalTransportFactory::class,
'package' => 'symfony/postal-mailer',
],
'postmark' => [
'class' => Bridge\Postmark\Transport\PostmarkTransportFactory::class,
'package' => 'symfony/postmark-mailer',
Expand Down
3 changes: 3 additions & 0 deletions Tests/Exception/UnsupportedSchemeExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
use Symfony\Component\Mailer\Bridge\Mailomat\Transport\MailomatTransportFactory;
use Symfony\Component\Mailer\Bridge\MailPace\Transport\MailPaceTransportFactory;
use Symfony\Component\Mailer\Bridge\Postal\Transport\PostalTransportFactory;
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
use Symfony\Component\Mailer\Bridge\Resend\Transport\ResendTransportFactory;
use Symfony\Component\Mailer\Bridge\Scaleway\Transport\ScalewayTransportFactory;
Expand All @@ -50,6 +51,7 @@ public static function setUpBeforeClass(): void
MailjetTransportFactory::class => false,
MailomatTransportFactory::class => false,
MandrillTransportFactory::class => false,
PostalTransportFactory::class => false,
PostmarkTransportFactory::class => false,
ResendTransportFactory::class => false,
ScalewayTransportFactory::class => false,
Expand Down Expand Up @@ -83,6 +85,7 @@ public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \
yield ['mailomat', 'symfony/mailomat-mailer'];
yield ['mailpace', 'symfony/mail-pace-mailer'];
yield ['mandrill', 'symfony/mailchimp-mailer'];
yield ['postal', 'symfony/postal-mailer'];
yield ['postmark', 'symfony/postmark-mailer'];
yield ['resend', 'symfony/resend-mailer'];
yield ['scaleway', 'symfony/scaleway-mailer'];
Expand Down
2 changes: 2 additions & 0 deletions Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
use Symfony\Component\Mailer\Bridge\Mailomat\Transport\MailomatTransportFactory;
use Symfony\Component\Mailer\Bridge\MailPace\Transport\MailPaceTransportFactory;
use Symfony\Component\Mailer\Bridge\Postal\Transport\PostalTransportFactory;
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
use Symfony\Component\Mailer\Bridge\Resend\Transport\ResendTransportFactory;
use Symfony\Component\Mailer\Bridge\Scaleway\Transport\ScalewayTransportFactory;
Expand Down Expand Up @@ -59,6 +60,7 @@ final class Transport
MailomatTransportFactory::class,
MailPaceTransportFactory::class,
MandrillTransportFactory::class,
PostalTransportFactory::class,
PostmarkTransportFactory::class,
ResendTransportFactory::class,
ScalewayTransportFactory::class,
Expand Down

0 comments on commit 8b2fb26

Please sign in to comment.