Closed norm2k closed 9 years ago
I think this is related to #202
same problem here with commit 471cefb874af3ce53468313c1e116b28c3ddbf52
@PhilPhonic , @norm2k Do you remember the last version that works in your iPhone?
Html email started working properly in my iphone again after checking out cc48500. I also tried to checkout dcc5960, but with that one, the problem appeared again. (i haven't tried any other than those)
Thanks!! that reduces the problem, a bit. But I'm not sure yet if the problem is withing mimeDecode or the SMIME changes in IMAP.
Can you check if putting the include/mimeDecode.php file from cc48500 in your dcc5960 works?
I just tried using include/mimeDecode.php from cc48500, but it didn't work unfortunately. The same error as before Tried some more, dee36d1 works, but not dcb3f85, so the problem seem to appear there.
The last version I used was 290b0e641fcee4b6536832a03a00eb1d3f296241 I'm quite sure this version worked. I can't exactly tell which version was the last one working, because I directly migrated to 471cefb874af3ce53468313c1e116b28c3ddbf52
Could you check again with the last version, please?
I just upgraded to the lastest version, but html mails are still displayed as plaintext on my iPhone.
Can you post this log lines (DEBUG level)?
BackendIMAP->GetMessage(): Message is multipart: %d, smime: %d, smime encrypted: %d
BackendIMAP->GetMessage - getBodyPreferenceBestMatch: %d
BackendIMAP->GetMessage - after thinking a bit we will use: %d
There you go:
12/07/2015 09:54:27 [13362] [DEBUG] [mail@example.com] BackendIMAP->GetMessage(): Message is multipart: 1, smime: 0, smime encrypted: 0 12/07/2015 09:54:27 [13362] [DEBUG] [mail@example.com] BackendIMAP->GetMessage - getBodyPreferenceBestMatch: 2 12/07/2015 09:54:27 [13362] [DEBUG] [mail@example.com] BackendIMAP->GetMessage - after thinking a bit we will use: 2
There is also a line like this one:
BackendIMAP->GetMessage('be1b3140', '114', '2')
The third parameter is a list of supported formats by the mobile.
For example, my Nexus 4 only tells it support HTML, a Sony Xperi tell 2 and 1...
@PhilPhonic can you tell me also if the backend/imap/config.php defined is false?
define('MAIL_PREFER_MIME_TYPE', true);
By default is false, but I think we should change it to true, otherwise iPhone would fail... And the last fixes in BackendIMAP should cover the Android device, that don't support MIME.
When setting that to true, html emails shows correctly, however, the small description under each email shown in the inbox is still html code.
The DEBUG Log sais it supports Plain text & HTML:
12/07/2015 09:54:27 [13362] [DEBUG] [mail@example.com] BackendIMAP->GetMessage('f78f31cf', '526', '1,2')
Now i set:
define('MAIL_PREFER_MIME_TYPE', true);
HTML is working now.
@danielpo what do you mean by "small description under each email"?
It means the preview showed in the message list windows.
The last commit should fix the problem and it also removes the MAIL_PREFER_MIME_TYPE option; BackendIMAP will choose by us.
Sorry, I have removed too much code. The previous commit reintroduced the problem, this one should fix it.
I have been using this new code for over 5 days and all of my email (and preview) have been displayed correctly so far. Thanks for your hard work @fmbiete I really appreciate it!
Thanks for letting me know!! I close this, but if someone continues having problems feel free to reopen it.
Hi -- I'm using 3f9f12c and still seeing the preview appear in HTML, although the messages themselves are fine. I'm on iOS 8.4.
@mdave Can you paste some WBXML logs for a GetMessage?
I had a similar problem. I am on IOS 8.1. I had to remove the email profile from the phone and add it agin. That solved the problem for me. You could also just use z-push-admin.php to do the same thing without having to reconfigure your email settings...
@fmbiete Okay, here is the entry from the log. I've extracted the bit that others above seem to have supplied:
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->StatMessage('dc6f5409','27985')
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->getImapIdFromFolderId('dc6f5409') = INBOX
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->GetMessage('dc6f5409', '27985', '1')
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->getImapIdFromFolderId('dc6f5409') = INBOX
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->StatMessage('dc6f5409','27985')
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->getImapIdFromFolderId('dc6f5409') = INBOX
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->GetMessage(): Message is multipart: 1, smime: 0, smime encrypted: 0
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->GetMessage(): getBodyPreferenceBestMatch: 1
20/07/2015 17:22:04 [19043] [DEBUG] [mail@example.com] BackendIMAP->GetMessage(): after thinking a bit we will use: 2
@norm2k I had assumed something similar might work. I have two devices on one account -- don't know if that should make a difference. In any case, just now I nuked both, ran the z-push-admin.php script to junk the state data too and tried again, but no dice for me.
After observing emails over the last 2 days, it seems that the summaries for everything that's been received after I posted my reply here seem to be fine. I guess there is a cache either on the phone/iPad or on my z-push installation that I didn't nuke properly. I'd suggest, since it seems to be working for others, that you could close this and I will update in case something breaks later on, but hopefully this is just a transient issue!
ok. Let me know if it happens again.
I am getting a lot of the following error in my debug log: Mail_mimeDecode()::_autoconvert_encoding(): Text cannot be correctly decoded, using original text. This will be ok if the part is not text, otherwise expect encoding errors This is causing most of my HTML emails to display at plain text on my iPhone. I am currently using the latest code with PHP 5.4.41-0+deb7u1. Anyone have any tips to get better results or know how to fix? This is new behavior for me. Thanks.