Fix email signature and remove signature image
This commit is contained in:
parent
e6d7cd329c
commit
3321ec6966
@ -109,7 +109,8 @@ 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>".
|
||||||
@ -128,4 +129,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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1885,7 +1885,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,12 +38,13 @@ class MailerService {
|
|||||||
){
|
){
|
||||||
$this->adminStorage = $rootFolder->getUserFolder(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD);
|
$this->adminStorage = $rootFolder->getUserFolder(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD);
|
||||||
}
|
}
|
||||||
public function getFooterContent ($userName = "Johann"){
|
public function getFooterContent ($userName = "DEKINDT Vanessa"){
|
||||||
$wish = "<p>Vous en souhaitant bonne réception. </p>";
|
$wish = "<p>Vous en souhaitant bonne réception. </p>";
|
||||||
$cordialement = "<p> Cordialement,</p>";
|
$cordialement = "<p> Cordialement,</p>";
|
||||||
$userName = "<p> {$userName} </p>" ;
|
$userName = "<p> {$userName} </p>" ;
|
||||||
$signatureImage = $this->getSignatureHtmlEmailContent();
|
// $signatureImage = $this->getSignatureHtmlEmailContent();
|
||||||
return $wish . $cordialement .$userName . $signatureImage ;
|
// return $wish . $cordialement .$userName . $signatureImage ;
|
||||||
|
return $wish . $cordialement .$userName ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getSignatureHtmlEmailContent (){
|
private function getSignatureHtmlEmailContent (){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user