Mail Parser: Completely remove Webklex IMAP and all dependcies

This commit is contained in:
johnnyq
2026-06-24 13:39:07 -04:00
parent 63ad3256ee
commit 171a0d38f8
779 changed files with 6408 additions and 82971 deletions

View File

@@ -43,7 +43,8 @@ class MimeToken extends Token
public function __construct(LoggerInterface $logger, MbWrapper $charsetConverter, string $value)
{
parent::__construct($logger, $charsetConverter, $value);
$this->value = $this->decodeMime(\preg_replace('/\r|\n/', '', $this->value));
$decoded = $this->decodeMime(\preg_replace('/\r|\n/', '', $this->value));
$this->value = \preg_replace('/[\r\n]+/', '', $decoded) ?? '';
$pattern = self::MIME_PART_PATTERN;
$this->canIgnoreSpacesBefore = (bool) \preg_match("/^\s*{$pattern}|\s+/", $this->rawValue);
$this->canIgnoreSpacesAfter = (bool) \preg_match("/{$pattern}\s*|\s+\$/", $this->rawValue);

View File

@@ -64,10 +64,10 @@ class ParameterPart extends NameValuePart
protected function decodePartValue(string $value, ?string $charset = null) : string
{
if ($charset !== null) {
return $this->convertEncoding(\rawurldecode($value), $charset, true);
}
return $this->convertEncoding(\rawurldecode($value));
$decoded = ($charset !== null)
? $this->convertEncoding(\rawurldecode($value), $charset, true)
: $this->convertEncoding(\rawurldecode($value));
return \preg_replace('/[\r\n]+/', '', $decoded) ?? $decoded;
}
protected function getValueFromParts(array $parts) : string