Skip to content

Commit

Permalink
add config for cudi mails
Browse files Browse the repository at this point in the history
  • Loading branch information
rserry committed Sep 28, 2023
1 parent bd57053 commit 4ddb3f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 7 additions & 3 deletions module/CudiBundle/Command/CatalogUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,17 @@ private function notifySubscribers(array $subjects, AcademicYear $academicYear)
->setFrom($mailAddress, $mailName)
->addTo($subscription->getPerson()->getEmail(), $subscription->getPerson()->getFullName())
->addCc($mailAddress, $mailName)
->addBcc(
->setSubject($mailSubject);

if($this->getEntityManager()->getRepository('Common\Entity\General\Config')
->getConfigValue('cudi.catalog_update_mail_to_sysadmin')){
$mail->addBcc(
$this->getEntityManager()
->getRepository('CommonBundle\Entity\General\Config')
->getConfigValue('system_administrator_mail'),
'System Administrator'
)
->setSubject($mailSubject);
);
}

if ($sendMails) {
$this->getMailTransport()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@
'value' => '1',
'description' => 'Flag whether to send the catalog update mails.',
),
array(
'key' => 'cudi.catalog_update_mail_to_sysadmin',
'value' => '1',
'description' => 'Flag whether to send the catalog update mails tot sysadmin.',
),
array(
'key' => 'cudi.sale_light_version',
'value' => '0',
Expand Down

0 comments on commit 4ddb3f5

Please sign in to comment.