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