Closed cketti closed 1 year ago
Patch merged, thanks for your contribution.
I just left an additional fallback case on bodystructure type. Can you please confirm ?
@mguessan: The line count value must only be present for text parts. Non-text parts must omit that value.
Here's the comment we have in K-9 Mail to illustrate how the indices of values are different for text parts and non-text parts:
/*
* 0| 0 body type
* 1| 1 body subtype
* 2| 2 body parameter parenthesized list
* 3| 3 body id (unused)
* 4| 4 body description (unused)
* 5| 5 body encoding
* 6| 6 body size
* -| 7 text lines (only for type TEXT, unused)
* Extensions (optional):
* 7| 8 body MD5 (unused)
* 8| 9 body disposition
* 9|10 body language (unused)
* 10|11 body location (unused)
*/
Your additional else case writes out the value 0
that will be interpreted as body MD5 value by implementations that support reading optional extensions.
Fixes https://sourceforge.net/p/davmail/bugs/723/