Skip to content

Commit

Permalink
Merge pull request #4609 from laboro/fix/CRM-3513_1.7
Browse files Browse the repository at this point in the history
CRM-3513 1.7: Email are shown with all html tags
  • Loading branch information
mccar committed Jun 16, 2015
2 parents 3ab2138 + 8e96913 commit 597bf02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Oro/Bundle/EmailBundle/Workflow/Action/SendEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public function initialize(array $options)
*/
protected function executeAction($context)
{
$type = 'txt';
$emailModel = new Email();
$emailModel->setFrom($this->getEmailAddress($context, $this->options['from']));
$to = [];
Expand All @@ -87,6 +88,10 @@ protected function executeAction($context)
$emailModel->setBody(
$this->contextAccessor->getValue($context, $this->options['body'])
);
if (array_key_exists('type', $this->options) && in_array($this->options['type'], ['txt', 'html'], true)) {
$type = $this->options['type'];
}
$emailModel->setType($type);

$email = $this->emailProcessor->process($emailModel);

Expand Down

0 comments on commit 597bf02

Please sign in to comment.