You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP 7.2.2, Zend Mail at it's latest version as of today.
I'm opening an old mailbox file generated by Mozilla Thunderbird (please note that I get the same issue with other Thunderbird mailbox files). It has 2,521 messages and every single one of them causes this Zend\Mail\Exception\RuntimeException.
This issue happens:
When trying to iterate through the mailbox file with a foreach (as shown in the docs);
When trying to fetch a specific message after iterating via a count() + regular for loop .
And it's located at zendframework/zend-mail/src/Headers.php on line 109.
The exact headers causing the issue are X-Mozilla-Status and X-Account-Key. See the sample below (I've removed [potentially] sensitive data such as e-mail addresses, etc... for obvious reasons).
Line "X-Mozilla-Status: 0019
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Received: (qmail 20021 invoked from network); 24 Apr 2008 14:23:38 -0300
Received: from [redacted].google.com (216.239.58.185) by [redacted]
with SMTP; 24 Apr 2008 14:23:38 -0300
Received-SPF: softfail ([redacted]: transitioning SPF record at
[redacted] does not designate [redacted] as permitted sender)
Received: by [redacted].google.com with SMTP id [redacted] for
<[redacted]>; Thu, 24 Apr 2008 11:36:07 -0700 (PDT)
Received: by 10.150.49.1 with SMTP id [redacted]; Thu,
24 Apr 2008 11:35:17 -0700 (PDT)
Received: by [redacted] with HTTP; Thu, 24 Apr 2008 11:35:17 -0700 (PDT)
Message-ID: <[redacted]@mail.gmail.com>
Date: Thu, 24 Apr 2008 15:35:17 -0300
From: "[redacted]" <[redacted]>
To: [redacted]
Subject: =?ISO-8859-1?[redacted]?=
In-Reply-To: <[redacted]>
MIME-Version: 1.0
Content-Type: multipart/related; boundary="----=_Part_22_2026612.1209062117791"
References: <[redacted]>
X-Evolution-Source: [redacted]
X-Evolution: [redacted]
" does not match header format!
I believe a clarification is in order: I simply cannot fetch these messages. It doesn't matter if I catch this Exception or not, which is the reason for this issue.
Update: Using the second method (count + for loop) it's possible to catch the Exception, but still, every single message causes this Exception, making the task of reading these messages absolutely impossible.
Since Custom Headers seem to be a common thing, I'd remove this exception entirely or at least modify Zend\Mail so the presence of such a header doesn't block the entire operation of fetching a message.
PHP 7.2.2, Zend Mail at it's latest version as of today.
I'm opening an old mailbox file generated by Mozilla Thunderbird (please note that I get the same issue with other Thunderbird mailbox files). It has 2,521 messages and every single one of them causes this Zend\Mail\Exception\RuntimeException.
This issue happens:
And it's located at zendframework/zend-mail/src/Headers.php on line 109.
The exact headers causing the issue are X-Mozilla-Status and X-Account-Key. See the sample below (I've removed [potentially] sensitive data such as e-mail addresses, etc... for obvious reasons).
Originally posted by @galvao at zendframework/zend-mail#193
The text was updated successfully, but these errors were encountered: