HFC : add footer email to real admin of app

This commit is contained in:
narindraezway 2025-08-08 11:39:46 +03:00
parent a72b294150
commit 86c6580cc2
2 changed files with 8 additions and 2 deletions

View File

@ -109,7 +109,7 @@ class InvoiceController extends Controller
$message->attach($content); $message->attach($content);
$message->setSubject("Facture"); $message->setSubject("Facture");
$signature = $this->mailerService->getFooterContent(); $signature = $this->mailerService->getFooterContent($this->getUserNameForEmailSignature());
$message->setHtmlBody( $message->setHtmlBody(
"<p>Bonjour.</p>". "<p>Bonjour.</p>".
@ -126,4 +126,10 @@ class InvoiceController extends Controller
} }
return new DataResponse("E-mail envoyé avec succès à ".$email.".", 200, ['Content-Type' => 'application/json']); return new DataResponse("E-mail envoyé avec succès à ".$email.".", 200, ['Content-Type' => 'application/json']);
} }
public function getUserNameForEmailSignature (){
$configs = json_decode($this->gestionRepository->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD));
$currentConfig = $configs[0];
return $currentConfig->nom . " " . $currentConfig->prenom;
}
} }

View File

@ -1636,7 +1636,7 @@ class PageController extends Controller {
} }
} }
public function getUserNameForEmailSignature (){ public function getUserNameForEmailSignature (){
$configs = json_decode($this->myDb->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN)); $configs = json_decode($this->myDb->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD));
$currentConfig = $configs[0]; $currentConfig = $configs[0];
return $currentConfig->nom . " " . $currentConfig->prenom; return $currentConfig->nom . " " . $currentConfig->prenom;
} }