Skip to content

Commit c0bd3a2

Browse files
-
1 parent 153678a commit c0bd3a2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/packages/mailer.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
framework:
22
mailer:
33
dsn: '%env(MAILER_DSN)%'
4+
envelope:
5+
sender: '%env(SENDER_ADDRESS)%'

src/Command/SendNotificationsCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ class SendNotificationsCommand extends Command
1919
{
2020
protected static $defaultName = 'app:send-notifications';
2121

22-
public function __construct(AppSubscriptionManager $appSubscriptionManager, AppNotificationManager $appNotificationManager, string $vapidPublicKey, string $vapidPrivateKey, HttpClientInterface $client, MailerInterface $mailer, string $senderAddress)
22+
public function __construct(AppSubscriptionManager $appSubscriptionManager, AppNotificationManager $appNotificationManager, string $vapidPublicKey, string $vapidPrivateKey, HttpClientInterface $client, MailerInterface $mailer)
2323
{
2424
$this->appSubscriptionManager = $appSubscriptionManager;
2525
$this->appNotificationManager = $appNotificationManager;
2626
$this->vapidPublicKey = $vapidPublicKey;
2727
$this->vapidPrivateKey = $vapidPrivateKey;
2828
$this->client = $client;
2929
$this->mailer = $mailer;
30-
$this->senderAddress = $senderAddress;
3130

3231
parent::__construct();
3332
}
@@ -84,7 +83,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8483

8584
case AppSubscriptionModel::TYPE_EMAIL:
8685
$email = (new Email())
87-
->from($this->senderAddress)
8886
->to($subscription->getEndpoint())
8987
->subject($notification->getSubject())
9088
->text($notification->getBody());

0 commit comments

Comments
 (0)