Skip to content
Snippets Groups Projects
Commit 6f375159 authored by Jared Hancock's avatar Jared Hancock
Browse files

Fallback to base64_decode if imap_base64 fails

Some mail clients and servers (like the ones developed in the northwestern
United States) sometimes place encoded and non-encoded data in an email
body declared with "Content-Transfer-Encoding: base64". imap_base64 will
refuse to decode the body if it contains non base64 characters (like a
period, colon, apostrophe, etc). This patch uses base64_decode as a fallback
which will make a best effort to decode the data. In the case of our test
mails, the decoded data will contain garbage where the non-base64-encoded
data was in the original mail, but at least the message is preserved.
parent f76ca095
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment