zend-mail
zend-mail copied to clipboard
Error parsing response - FETCH ENVELOPE
PHP
$protocol->requestAndResponse('FETCH', ['3596', $protocol->escapeList(['ENVELOPE'])], false);
IMAP response
- 3596 FETCH (ENVELOPE ("Mon, 07 Apr 2014 08:32:39 +0000" "Igor Presnyakov: "Kansas - Dust In The Wind ( guitar&vocal edition ) - Igor Presnyakov"" (("YouTube" NIL "noreply" "youtube.com")) (("YouTube" NIL "noreply" "youtube.com")) (("YouTube" NIL "noreply" "youtube.com")) (("My Name" NIL "username" "gmail.com")) NIL NIL NIL "****@google.com"))
ZEND response
Notice: Uninitialized string offset: 0 in vendor/zendframework/zend-mail/src/Protocol/Imap.php on line 189
Notice: Uninitialized string offset: 0 in /vendor/zendframework/zend-mail/src/Protocol/Imap.php on line 194
Notice: Uninitialized string offset: 0 in /vendor/zendframework/zend-mail/src/Protocol/Imap.php on line 201
Notice: Uninitialized string offset: -1 in /vendor/zendframework/zend-mail/src/Protocol/Imap.php on line 221
array (
0 =>
array (
0 => '3596',
1 => 'FETCH',
2 =>
array (
0 => 'ENVELOPE',
1 =>
array (
0 => 'Mon, 07 Apr 2014 08:32:39 +0000',
1 => 'Igor Presnyakov: \\',
2 => 'Kansas',
3 => '-',
4 => 'Dust',
5 => 'In',
6 => 'The',
7 => 'Wind',
8 =>
array (
0 => '',
1 => 'guitar&vocal',
2 => 'edition',
),
9 => '-',
10 => 'Igor',
11 => 'Presnyakov\\""',
12 =>
array (
0 =>
array (
0 => 'YouTube',
1 => 'NIL',
2 => 'noreply',
3 => 'youtube.com',
),
),
13 =>
array (
0 =>
array (
0 => 'YouTube',
1 => 'NIL',
2 => 'noreply',
3 => 'youtube.com',
),
),
14 =>
array (
0 =>
array (
0 => 'YouTube',
1 => 'NIL',
2 => 'noreply',
3 => 'youtube.com',
),
),
15 =>
array (
0 =>
array (
0 => 'My Name',
1 => 'NIL',
2 => 'username',
3 => 'gmail.com',
),
),
16 => 'NIL',
17 => 'NIL',
18 => 'NIL',
19 => '<****@google.com>',
),
),
),
)
*** Expected ZEND response
array (
0 => 'Mon, 07 Apr 2014 08:32:39 +0000',
1 => 'Igor Presnyakov: \\"Kansas - Dust In The Wind ( guitar&vocal edition ) - Igor Presnyakov\\"',
2 =>
array (
0 =>
array (
0 => 'YouTube',
1 => 'NIL',
2 => 'noreply',
3 => 'youtube.com',
),
),
3 =>
array (
0 =>
array (
0 => 'YouTube',
1 => 'NIL',
2 => 'noreply',
3 => 'youtube.com',
),
),
4 =>
array (
0 =>
array (
0 => 'YouTube',
1 => 'NIL',
2 => 'noreply',
3 => 'youtube.com',
),
),
5 =>
array (
0 =>
array (
0 => 'My Name',
1 => 'NIL',
2 => 'username',
3 => 'gmail.com',
),
),
6 => 'NIL',
7 => 'NIL',
8 => 'NIL',
9 => '<****@google.com>',
)
*** Managed to parse response with the help of: https://github.com/petewarden/handmadeimap
Thanks!
Please edit your question and style it for to make it more legible https://guides.github.com/features/mastering-markdown/
@Maks3w done
This repository has been closed and moved to laminas/laminas-mail; a new issue has been opened at https://github.com/laminas/laminas-mail/issues/62.