diff --git a/gestion/lib/Constants/BddConstant.php b/gestion/lib/Constants/BddConstant.php index 527f8a3..3b582e0 100644 --- a/gestion/lib/Constants/BddConstant.php +++ b/gestion/lib/Constants/BddConstant.php @@ -13,4 +13,7 @@ abstract class BddConstant const ISLEAVEPROPERTYONVCALENDAR = "ISLEAVE"; const DEFAULT_THANATOS_GROUP_NAME = "Thanatos"; + + const DEFAULT_ATTESTATION_CC_EMAIL = "attestation@h-f-c.info"; + const DEFAULT_INVOICE_CC_EMAIL = "attestation@h-f-c.info"; } \ No newline at end of file diff --git a/gestion/lib/Controller/InvoiceController.php b/gestion/lib/Controller/InvoiceController.php index 806b612..2dfbe6d 100644 --- a/gestion/lib/Controller/InvoiceController.php +++ b/gestion/lib/Controller/InvoiceController.php @@ -116,10 +116,8 @@ class InvoiceController extends Controller "

Vous trouverez en pièce jointe la facture des soins de " . $factureDate . ".

". $signature ); - $appAdminEmail = $this->gestionRepository->getUserEmailByNextcloudId(BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD); - if ($appAdminEmail) { - $message->setCc([$appAdminEmail]); - } + $appAdminEmail = BddConstant::DEFAULT_INVOICE_CC_EMAIL; + $message->setCc([$appAdminEmail]); $this->mailer->send($message); $this->gestionRepository->setFactureSentDate($factureId); diff --git a/gestion/lib/Controller/PageController.php b/gestion/lib/Controller/PageController.php index ea76101..84b3e15 100644 --- a/gestion/lib/Controller/PageController.php +++ b/gestion/lib/Controller/PageController.php @@ -1625,10 +1625,8 @@ class PageController extends Controller { $signature ); - $appAdminEmail = $this->myDb->getUserEmailByNextcloudId(BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD); - if ($appAdminEmail) { - $message->setCc([$appAdminEmail]); - } + $appAdminEmail = BddConstant::DEFAULT_ATTESTATION_CC_EMAIL; + $message->setCc([$appAdminEmail]); $this->mailer->send($message); return new DataResponse("", 200, ['Content-Type' => 'application/json']); // } catch (Exception $e) {