Skip to content

Commit 7ec706b

Browse files
committed
feature #58698 [Mailer] Add AhaSend Bridge (farhadhf)
This PR was squashed before being merged into the 7.3 branch. Discussion ---------- [Mailer] Add AhaSend Bridge | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | | License | MIT | Doc PR | symfony/symfony-docs#20361 | Recipe PR | symfony/recipes#1350 This PR adds support for a new mail bridge for the [AhaSend](https://ahasend.com) email service. It includes support for SMTP and API transports (along with support for attachments for the API transport), and both delivery and engagement webhooks. Commits ------- 3dfad14c714 [Mailer] Add AhaSend Bridge
2 parents 1017fe9 + 0f836d7 commit 7ec706b

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
@@ -20,6 +20,10 @@
2020
class UnsupportedSchemeException extends LogicException
2121
{
2222
private const SCHEME_TO_PACKAGE_MAP = [
23+
'ahasend' => [
24+
'class' => Bridge\AhaSend\Transport\AhaSendTransportFactory::class,
25+
'package' => 'symfony/ahasend-mailer',
26+
],
2327
'azure' => [
2428
'class' => Bridge\Azure\Transport\AzureTransportFactory::class,
2529
'package' => 'symfony/azure-mailer',

Tests/Exception/UnsupportedSchemeExceptionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Bridge\PhpUnit\ClassExistsMock;
16+
use Symfony\Component\Mailer\Bridge\AhaSend\Transport\AhaSendTransportFactory;
1617
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
1718
use Symfony\Component\Mailer\Bridge\Azure\Transport\AzureTransportFactory;
1819
use Symfony\Component\Mailer\Bridge\Brevo\Transport\BrevoTransportFactory;
@@ -43,6 +44,7 @@ public static function setUpBeforeClass(): void
4344
{
4445
ClassExistsMock::register(__CLASS__);
4546
ClassExistsMock::withMockedClasses([
47+
AhaSendTransportFactory::class => false,
4648
AzureTransportFactory::class => false,
4749
BrevoTransportFactory::class => false,
4850
GmailTransportFactory::class => false,
@@ -79,6 +81,7 @@ public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme,
7981

8082
public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator
8183
{
84+
yield ['ahasend', 'symfony/ahasend-mailer'];
8285
yield ['azure', 'symfony/azure-mailer'];
8386
yield ['brevo', 'symfony/brevo-mailer'];
8487
yield ['gmail', 'symfony/google-mailer'];

Transport.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Psr\EventDispatcher\EventDispatcherInterface;
1515
use Psr\Log\LoggerInterface;
16+
use Symfony\Component\Mailer\Bridge\AhaSend\Transport\AhaSendTransportFactory;
1617
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
1718
use Symfony\Component\Mailer\Bridge\Azure\Transport\AzureTransportFactory;
1819
use Symfony\Component\Mailer\Bridge\Brevo\Transport\BrevoTransportFactory;
@@ -52,6 +53,7 @@
5253
final class Transport
5354
{
5455
private const FACTORY_CLASSES = [
56+
AhaSendTransportFactory::class,
5557
AzureTransportFactory::class,
5658
BrevoTransportFactory::class,
5759
GmailTransportFactory::class,

0 commit comments

Comments
 (0)