Message too long

Sandro Knauß sknauss at kde.org
Mon May 10 12:57:16 BST 2021


Hey,

> There is a limit of 998 characters per line that some email servers enforce.
> Since HTML addresses cannot be split into several lines without breaking
> them, it's possible that very long addresses exceed this limit. If the HTML
> address triggering the error is less than 998 characters long, then KMail
> might be doing something wrong.
> 
> For the Subject (and other headers like the From and To addresses) there are
> special rules which allow splitting long lines into smaller lines without
> breaking HTML addresses.

But there are Content-Transfer-Encodings (CTEs) that allows to split lines 
without breaking HTML, as those are applied is done before HTML/text  
interpretation is done. My expectation is, that we do not detect the need to 
split lines via CTE. And yes the choosing of CTE is independent of line 
length:
https://invent.kde.org/pim/messagelib/-/blob/master/messagecomposer/src/job/
singlepartjob.cpp#L42

A workaround would be to trigger the composer to use Base64 CTE by adding so 
many non ascii characters to your mail so it prefers Base64. At least if I 
remember correctly Base64 will split lines after 78 charaters.

Regards,

hefee




More information about the kdepim-users mailing list