Skip to content

Commit

Permalink
Fixed Pint Issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-webkul committed Jan 10, 2025
1 parent ff83fe7 commit bfde074
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/Webkul/Email/src/Helpers/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,18 +359,18 @@ public function getMessageBody($type = 'text')
$textBody .= $this->decodeContentTransfer($this->getPartBody($part), $encodingType);
$textBody = nl2br($this->charset->decodeCharset($textBody, $this->getPartCharset($part)));
} elseif ($this->getPart('content-type', $part) == 'text/plain; (error)') {
if (empty($part['headers']) || !isset($part['headers']['from'])) {
if (empty($part['headers']) || ! isset($part['headers']['from'])) {
$parentKey = explode('.', $key)[0];
if (isset($this->parts[$parentKey]) && isset($this->parts[$parentKey]['headers']['from'])) {
$part_from_sender = is_array($this->parts[$parentKey]['headers']['from'])
? $this->parts[$parentKey]['headers']['from'][0]
$part_from_sender = is_array($this->parts[$parentKey]['headers']['from'])
? $this->parts[$parentKey]['headers']['from'][0]
: $this->parts[$parentKey]['headers']['from'];
} else {
continue;
}
} else {
$part_from_sender = is_array($part['headers']['from'])
? $part['headers']['from'][0]
$part_from_sender = is_array($part['headers']['from'])
? $part['headers']['from'][0]
: $part['headers']['from'];
}
$mail_part_addresses = mailparse_rfc822_parse_addresses($part_from_sender);
Expand Down

0 comments on commit bfde074

Please sign in to comment.