Skip to content

Commit

Permalink
Prevent Same value for different contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzmany committed Feb 17, 2020
1 parent 510c369 commit c85666b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EventListener/EmailSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public function __construct(TemplateProcessor $templateProcessor)
public static function getSubscribedEvents()
{
return [
EmailEvents::EMAIL_ON_SEND => ['onEmailGenerate', 0],
EmailEvents::EMAIL_ON_DISPLAY => ['onEmailGenerate', 0]
EmailEvents::EMAIL_ON_SEND => ['onEmailGenerate', 300],
EmailEvents::EMAIL_ON_DISPLAY => ['onEmailGenerate', 0],
];
}

Expand All @@ -52,7 +52,7 @@ public static function getSubscribedEvents()
public function onEmailGenerate(Events\EmailSendEvent $event)
{
$this->logger->info('onEmailGenerate MauticAdvancedTemplatesBundle\EmailSubscriber');
$content = $event->getContent();
$content = $event->getEmail()->getCustomHtml();
$content = $this->templateProcessor->processTemplate($content, $event->getLead());
$event->setContent($content);
if ( empty( trim($event->getPlainText()) ) ) {
Expand Down

0 comments on commit c85666b

Please sign in to comment.