Open peter-schmandra-yesmail opened 6 years ago
Hi, may you post the result of the call to getRawMessage()
on the Message that raised the error?
OMG, I did not even think that. However, I don't want this public. Can I zip it up and email it to u?
Sure :+1:
Is that your email in the LICENSE?
Take a look at the second line of the last commit: https://github.com/ddeboer/imap/commit/00b75df6d51bcadae5e2b449a04d928322a1f6aa.patch
Encountered a similar error
PHP Notice: Unknown: Calculated RFC822.SIZE (51990) != reported size (51992) (errflg=1) in Unknown on line 0
Used the same solution by adding \imap_errors(); to /ddeboer/imap/src/Message.php Line 125.
May you post the exact diff of how you altered this library to suppress the error please?
From what I understand every imap_* function call has the potential to output an error notice. However the following edit suppressed the ones I was encountering. Diff is from /src/messages.php
I'm parsing emails and came across an email with a mangled from address. The script puts out the following error
"PHP Notice: Unknown: Missing or invalid host name after @ (errflg=3) in Unknown on line 0"
Upon further reading I cam across this solution
https://stackoverflow.com/questions/3378469/how-to-get-rid-of-error-messages-with-phps-imap-fetchstructure
So I added the line to /ddeboer/imap/src/Message.php Line 66 and now my exception is caught cleanly. I did not make a pull request because I am not sure exactly what this function call is doing in that context. Also, cannot provide the raw email because it's in a chinese mailbox in an obscure ISP and I cannot figure out how to download the raw source. Great repo BTW. Thanks very much.