Skip to content

Commit

Permalink
mail to customer issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjeev Papnoi committed Jan 7, 2020
1 parent cfc5a78 commit b4fe0a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Workflow/Actions/Ticket/MailCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static function applyAction(ContainerInterface $container, $entity, $valu

// Only process attachments if required in the message body
// @TODO: Revist -> Maybe we should always include attachments if they are provided??
$attachments = [];
if (!empty($createdThread) && (strpos($emailTemplate->getMessage(), '{%ticket.attachments%}') !== false || strpos($emailTemplate->getMessage(), '{% ticket.attachments %}') !== false)) {
$attachments = array_map(function($attachment) use ($container) {
return str_replace('//', '/', $container->get('kernel')->getProjectDir() . "/public" . $attachment->getPath());
Expand All @@ -65,7 +66,8 @@ public static function applyAction(ContainerInterface $container, $entity, $valu
$ticketPlaceholders = $container->get('email.service')->getTicketPlaceholderValues($entity);
$subject = $container->get('email.service')->processEmailSubject($emailTemplate->getSubject(), $ticketPlaceholders);
$message = $container->get('email.service')->processEmailContent($emailTemplate->getMessage(), $ticketPlaceholders);


$thread = ($thread != null) ? $thread : $createdThread;
if (!empty($thread)) {
$headers = ['References' => $entity->getReferenceIds()];

Expand Down

0 comments on commit b4fe0a1

Please sign in to comment.