Skip to content

Commit 44e7797

Browse files
add missing conditional statement in send-all method also comment the sendmail functionality in welcome mail
1 parent 41ce0f0 commit 44e7797

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

lib/Command/SendAllMail.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,15 @@ public function __construct(
5252
}
5353

5454
protected function configure() {
55-
$this
56-
->setName('monthly_status_email:send-all')
57-
->setDescription('Send the notification mail to all users');
55+
$this->setName('monthly_status_email:send-all')
56+
->setDescription('Send the notification mail to all users');
5857
parent::configure();
5958
}
6059

6160
protected function execute(InputInterface $input, OutputInterface $output) {
6261
$trackedNotifications = $this->service->findAll();
6362
foreach ($trackedNotifications as $trackedNotification) {
64-
try {
65-
$ret = $this->mailSender->sendMonthlyMailTo($trackedNotification);
66-
} catch (\Exception $e) {
67-
$output->writeln('Failure sending email to ' . $trackedNotification->getUserId());
68-
}
63+
$ret = $this->mailSender->sendMonthlyMailTo($trackedNotification);
6964
if ($ret) {
7065
$output->writeln('Email sent to ' . $trackedNotification->getUserId());
7166
} else {

lib/Service/MailSender.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public function sendStatusEmailActivation(IUser $user, NotificationTracker $trac
250250
}
251251

252252
$this->provider->writeWelcomeMail($emailTemplate, $user->getDisplayName());
253-
$this->sendEmail($emailTemplate, $user, $message, $trackedNotification);
253+
//$this->sendEmail($emailTemplate, $user, $message, $trackedNotification);
254254
}
255255

256256
private function sendEmail(IEMailTemplate $template, IUser $user, IMessage $message, ?NotificationTracker $trackedNotification = null): void {

0 commit comments

Comments
 (0)