Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
imap processing error when "from" field is utf8 encoded #850
When an email is received with the "from" header encoded (for example "From: =?utf-8?q?D=C3=A9tection_de_spam_=3Cnoreply=401and1=2Efr=3E?="), the email is badly parsed, generating the following notification "Excessive errors processing emails for firstname.lastname@example.org. Please manually check the inbox".
This is caused by the call of imap_headerinfo in class.mailfetch.php, returning a variable without any "from" nor "fromaddress" field.
The from->mailbox and from->host would still have to be adapted after that
couldn't that be handled by doing something like:
sorry about the formatting of the regex, it gets messed because of the markup, the pattern before and after the @ is [a-z0-9._-]
of course, the output of var_dump(imap_fetchheader($this->mbox, $mid)); is the following:
string(655) "Return-Path: <>