ColorFlakes
Try these changes with a new collab:
diff --git a/include/class.format.php b/include/class.format.php
index 8d3f7f11..27b98c07 100644
--- a/include/class.format.php
+++ b/include/class.format.php
@@ -70,6 +70,18 @@ class Format {
return $text;
}
+ /**
+ * Formats header addresses for better parsing. Decodes encoded
+ * addresses and removes any quotes.
+ */
+ static function fixupAddressHeader($address) {
+ // Decode encoded addresses
+ if (str_contains($address, '=?'))
+ $address = self::mimedecode($address, $charset);
+ // Strip any quotes
+ return str_replace(["'", '"'], '', $address);
+ }
+
/**
* Decodes filenames given in the content-disposition header according
* to RFC5987, such as filename*=utf-8''filename.png. Note that the
diff --git a/include/class.mailparse.php b/include/class.mailparse.php
index 743d836a..522661a0 100644
--- a/include/class.mailparse.php
+++ b/include/class.mailparse.php
@@ -737,7 +737,7 @@ class Mail_Parse {
$address = implode(', ', $address);
$rfc822 = new Mail_RFC822();
- $parsed = $rfc822->parseAddressList($address, null, null,false);
+ $parsed = $rfc822->parseAddressList(Format::fixupAddressHeader($address), null, null,false);
if (PEAR::isError($parsed))
return array();
User information is not updated after it’s been created unless an agent or user manually updates it.
Cheers.