Skip to content

Commit

Permalink
Fix @fwd forwarding when styles are present in the email body - closes
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Nov 11, 2024
1 parent e2e3682 commit 8d65bdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Console/Commands/FetchEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,8 @@ public function processMessage($message, $message_id, $mailbox, $mailboxes, $ext
&& !$user_id && !$is_reply && !$prev_thread
// Only if the email has been sent to one mailbox.
&& count($to) == 1 && count($cc) == 0
&& preg_match("/^[\s]*".self::FWD_AS_CUSTOMER_COMMAND."/su", strtolower(trim(strip_tags($body))))
// We need to replace also any potential <style></style> tags.
&& preg_match("/^[\s]*".self::FWD_AS_CUSTOMER_COMMAND."/su", strtolower(trim(\Helper::stripTags($body))))
) {
// Try to get "From:" from body.
$original_sender = $this->getOriginalSenderFromFwd($body);
Expand Down

0 comments on commit 8d65bdf

Please sign in to comment.