Skip to content

Commit 8b2fb26

Browse files
committed
feature #57903 [Mailer] Implement Postal mailer (jonasclaes)
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
2 parents 495f032 + b2720aa commit 8b2fb26

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Exception/UnsupportedSchemeException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ class UnsupportedSchemeException extends LogicException
6060
'class' => Bridge\Mailchimp\Transport\MandrillTransportFactory::class,
6161
'package' => 'symfony/mailchimp-mailer',
6262
],
63+
'postal' => [
64+
'class' => Bridge\Postal\Transport\PostalTransportFactory::class,
65+
'package' => 'symfony/postal-mailer',
66+
],
6367
'postmark' => [
6468
'class' => Bridge\Postmark\Transport\PostmarkTransportFactory::class,
6569
'package' => 'symfony/postmark-mailer',

Tests/Exception/UnsupportedSchemeExceptionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
2525
use Symfony\Component\Mailer\Bridge\Mailomat\Transport\MailomatTransportFactory;
2626
use Symfony\Component\Mailer\Bridge\MailPace\Transport\MailPaceTransportFactory;
27+
use Symfony\Component\Mailer\Bridge\Postal\Transport\PostalTransportFactory;
2728
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
2829
use Symfony\Component\Mailer\Bridge\Resend\Transport\ResendTransportFactory;
2930
use Symfony\Component\Mailer\Bridge\Scaleway\Transport\ScalewayTransportFactory;
@@ -50,6 +51,7 @@ public static function setUpBeforeClass(): void
5051
MailjetTransportFactory::class => false,
5152
MailomatTransportFactory::class => false,
5253
MandrillTransportFactory::class => false,
54+
PostalTransportFactory::class => false,
5355
PostmarkTransportFactory::class => false,
5456
ResendTransportFactory::class => false,
5557
ScalewayTransportFactory::class => false,
@@ -83,6 +85,7 @@ public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \
8385
yield ['mailomat', 'symfony/mailomat-mailer'];
8486
yield ['mailpace', 'symfony/mail-pace-mailer'];
8587
yield ['mandrill', 'symfony/mailchimp-mailer'];
88+
yield ['postal', 'symfony/postal-mailer'];
8689
yield ['postmark', 'symfony/postmark-mailer'];
8790
yield ['resend', 'symfony/resend-mailer'];
8891
yield ['scaleway', 'symfony/scaleway-mailer'];

Transport.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
2525
use Symfony\Component\Mailer\Bridge\Mailomat\Transport\MailomatTransportFactory;
2626
use Symfony\Component\Mailer\Bridge\MailPace\Transport\MailPaceTransportFactory;
27+
use Symfony\Component\Mailer\Bridge\Postal\Transport\PostalTransportFactory;
2728
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
2829
use Symfony\Component\Mailer\Bridge\Resend\Transport\ResendTransportFactory;
2930
use Symfony\Component\Mailer\Bridge\Scaleway\Transport\ScalewayTransportFactory;
@@ -59,6 +60,7 @@ final class Transport
5960
MailomatTransportFactory::class,
6061
MailPaceTransportFactory::class,
6162
MandrillTransportFactory::class,
63+
PostalTransportFactory::class,
6264
PostmarkTransportFactory::class,
6365
ResendTransportFactory::class,
6466
ScalewayTransportFactory::class,

0 commit comments

Comments
 (0)