Skip to content

Commit

Permalink
Merge pull request #303 from I-Valchev/patch-1
Browse files Browse the repository at this point in the history
Update Email.php to get body only
  • Loading branch information
bobdenotter committed Aug 11, 2020
2 parents 449bc89 + 75ebdce commit 38af36a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private function emailCompose(FormConfig $formConfig, EmailConfig $emailConfig,
$fieldmap['data'] => $formData,
]);

$subject = new \Twig_Markup($html, 'UTF-8');
$subject = new \Twig_Markup($html->getContent(), 'UTF-8');

/*
* Body
Expand All @@ -105,7 +105,7 @@ private function emailCompose(FormConfig $formConfig, EmailConfig $emailConfig,
$fieldmap['data'] => $this->getBodyData($emailConfig, $formData),
]);

$body = new \Twig_Markup($html, 'UTF-8');
$body = new \Twig_Markup($html->getContent(), 'UTF-8');

$text = preg_replace('/<style\\b[^>]*>(.*?)<\\/style>/s', '', $body);

Expand Down

0 comments on commit 38af36a

Please sign in to comment.