New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imap_header doesn't work with message uid #26
Comments
sorry, don't know what it is but it seems like I have a "broken" message in my mailbox that is making trouble. Will get back on this soon. |
ok, seems like some messages are processed correctly (so it basically works) but my 4th message (processing mailbox->getMessages() ...) is making trouble on loading the headers. messageNumber is set. But probably there is something wrong and the message can not be identified by imap_header() just tried a short switch to use
|
Can you try to write a failing test case with your fourth message? — On Sat, Nov 30, 2013 at 8:02 PM, kaiserlos notifications@github.com
|
actually I am not sure how I could mock it because I can't exactly describe what is wrong. If you want I could send you the login to my testing mailbox, so you can also take a look on it. |
Does Or you can paste the source of your message here, so I can have a look. We can then use (parts of) that source for a test case. |
Not sure because it breaks the script already at the first message because of the missing properties. I got it working and pushed it to https://github.com/kaiserlos/imap After fixing the first (imap_header) problem I got into another problem based on my first email in the list (that worked before my imap_header fix). On parsing the header to recipients there where cases where the host property wasn't set and also one array part which does not have mailbox, host and personal set). I fixed this with the second commit on my fork. Haven't made a pull request for now because I am not sure if everything is still correct. (both are spam messages which are coming to an catchall inbox nutzer-catchall@kaiserlos.de)
The first message (which was working before my imap_header fix)
|
I can verify this problem exists for me too. Applying @kaiserlos patch fixes it. |
Please merge this fix and update bring out a new version |
The pull request #29 fixes this issue |
Fix https://github.com/kaiserlos/imap/commit/83bc9813e646859a43dca8863bcd1fb09e5dacaa indeed seems to do the trick. What is the status of this patch? Do you plan to merge it? It's clearly broken the way it is now and even if it appears to work, it's probably fetching wrong emails all the time... |
Confirmed for me too. Can we merge so it is easy to get the fixed package with packagist? |
If you have you have poblems because the
are working with the number of the message not the UID |
Hi,
nothing is working anymore for me.
ErrorException
imap_header(): Bad message number
my research has shown me that
imap_header()
http://us1.php.net/manual/en/function.imap-headerinfo.php doesn't work with uid ...
think a decision is needed if the slower imap_fetchheader should be used within the getHeaders function
This is a comment on php.net:
"I typically use UID's to identify messages, and recently discovered that the headers I had been pulling using this function and a message-number didn't match the UID's. Instead of worrying about it, I just began using imap_fetchheader() and imap_ rfc822_ parse_ headers() on its output. The only significant difference I immediately noticed was that there is no "udate" property, so I assigned one with the result of strtotime() on the 'date' property.
Dustin"
The text was updated successfully, but these errors were encountered: