Browse Source

MailUtils : correctif initialisation CONTENT_DATA

feature/export_comptable
Guillaume 4 years ago
parent
commit
4106ba5bc2
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      ShopBundle/Services/MailUtils.php

+ 7
- 2
ShopBundle/Services/MailUtils.php View File

isset($params[self::TO_NAME]) ? $params[self::TO_NAME] : null); isset($params[self::TO_NAME]) ? $params[self::TO_NAME] : null);
} }


$contentData = [] ;
if(isset($params[self::CONTENT_DATA])) {
$contentData = $params[self::CONTENT_DATA] ;
}

$message->addFrom($emailFrom, $emailFromName) $message->addFrom($emailFrom, $emailFromName)
->setBody($this->templating->render($params[self::CONTENT_TEMPLATE] . '-html.html.twig', $params[self::CONTENT_DATA]), 'text/html')
->addPart($this->templating->render($params[self::CONTENT_TEMPLATE] . '-text.html.twig', $params[self::CONTENT_DATA]));
->setBody($this->templating->render($params[self::CONTENT_TEMPLATE] . '-html.html.twig', $contentData), 'text/html')
->addPart($this->templating->render($params[self::CONTENT_TEMPLATE] . '-text.html.twig', $contentData));


if (isset($params[self::REPLY_TO]) && strlen($params[self::REPLY_TO])) { if (isset($params[self::REPLY_TO]) && strlen($params[self::REPLY_TO])) {
$message->addReplyTo($params[self::REPLY_TO]); $message->addReplyTo($params[self::REPLY_TO]);

Loading…
Cancel
Save