Refactor email signature handling to include user name in footer content
This commit is contained in:
parent
fd2754c9eb
commit
39f7cb6247
@ -1616,9 +1616,7 @@ class PageController extends Controller {
|
||||
$message->attach($content);
|
||||
$message->setSubject($subject);
|
||||
$body_text = $addName ? ($body." de ".$devis['defunt_nom'] ) : $body;
|
||||
|
||||
$signature = $this->mailerService->getFooterContent();
|
||||
|
||||
$signature = $this->mailerService->getFooterContent($this->getUserNameForEmailSignature());
|
||||
$message->setHtmlBody(
|
||||
"<p>Bonjour.</p>".
|
||||
"<p>$body_text</p>".
|
||||
@ -1636,13 +1634,10 @@ class PageController extends Controller {
|
||||
// }
|
||||
}
|
||||
}
|
||||
public function addSignatureEmailLogo (){
|
||||
$signatureImage = $this->getSignature();
|
||||
if (!$signatureImage) {
|
||||
return "";
|
||||
}
|
||||
//Add html img in base 64
|
||||
return "<img style= 'width: 250px;height: 150;' src='data:image/jpeg;base64,".base64_encode($signatureImage)."'>" ;
|
||||
public function getUserNameForEmailSignature (){
|
||||
$configs = json_decode($this->myDb->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN));
|
||||
$currentConfig = $configs[0];
|
||||
return $currentConfig->nom . " " . $currentConfig->prenom;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user