fmbiete / Z-Push-contrib

Z-Push fork with changes that I will try to contrib
GNU Affero General Public License v3.0
134 stars 62 forks source link

Forwarding issues with Samsung Galaxy S6 #230

Open FrankvdAa opened 9 years ago

FrankvdAa commented 9 years ago

When forwarding emails with the native email app on my Samsung Galaxy S6, the body gets messed up.

This only seems to happen when forwarding, not when sending a new email

I first send the following text to myself:

"This body is working fine.

Frank"

This is being displayed fine with Thunderbird and on my SGS6, but when I forward this email again to myself I get the following in Thunderbird:

"This body is messed up. Frank<div> </div><div> </div><!-- originalMessage --><div>-------- Oorspronkelijk bericht --------</div><div>Van: Frank <frank@xxxxxxxxx.xxx> </div><div>Datum: 16-09-2015 16:58 (GMT+01:00) </div><div>Aan: frank@xxxxxxxxx.xxx </div><div>Onderwerp: Testmail </div><div> </div>> This body is working fine. > Frank"

When I open this same email on my SGS6 it doesn't show the <div> tags, but it looks like it added both the original email and the reply twice; once separate from eachother and once concatenated as one mime part.

I'm currently using SVN-trunk-r1981, but I also have this same problem with SVN-trunk-r1788.

I wasn't experiencing this with my previous phone; SGS3. Also tested with SGS4 Mini without any problems.

SGS6 is running Android 5.1.1 and using BackendIMAP in Z-Push.

Please let me know if and how I can help debugging.

fmbiete commented 9 years ago

I have found that problem before with Samsung devices; the mail client they use is very buggy and won't forward messages correctly. You should put your log in WBXML level and post a forward operation so we can see what's wrong.

FrankvdAa commented 9 years ago

@fmbiete I've send you an email with WBXML logs, please let me know if there is anything else I can help with.

FrankvdAa commented 9 years ago

@fmbiete Did you receive my email?

fmbiete commented 8 years ago

@FrankvdAa Sorry, I have been busy with other projects this last months.

I have found a bug in the code:

06/10/2015 12:34:06 [27949] [DEBUG] [fvdaa] BackendIMAP->SendMail(): Forwarding inlined message
06/10/2015 12:34:06 [27949] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The message has HTML body
06/10/2015 12:34:06 [27949] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The original message had HTML body
06/10/2015 12:34:06 [27949] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The message has PLAIN body
06/10/2015 12:34:06 [27949] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The original message had HTML body, we cast new PLAIN to HTML
06/10/2015 12:34:06 [27949] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The original message had PLAIN body

I was adding the original plain and html body to the new plain part, so corrupting the plain-text message. The referenced commit should fix it.

Thanks!!

FrankvdAa commented 8 years ago

I've tried with the latest trunk version and WBXML-logging is now showing:

04/01/2016 16:39:04 [14272] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The message has HTML body 04/01/2016 16:39:04 [14272] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The original message had HTML body 04/01/2016 16:39:04 [14272] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The message has PLAIN body 04/01/2016 16:39:04 [14272] [DEBUG] [fvdaa] BackendIMAP->addTextParts(): The original message had PLAIN body

Unfortunately, the forwarded email still has a 'corrupted' body. I will send you the WBXML logging and some screenshots through email.