2

When using 8BITMIME smtp, you can set Content-Transfer-Encoding: 8bit in Mime messages and send text without encoding.

Except, there is still a line limit of 1000 octets (plus the line endings should all be <CR><LF>)

When my library gets arbitrary UTF-8 data from a user, how should I go about splitting lines? Is there any way to split a 1002 octets line in a safe way? And what about a 1002 octet word (without whitespace).

In Quoted-Printable you can do =<CR><LF>, is there something similar for 8bit?

tripleee
  • 175,061
  • 34
  • 275
  • 318
Peter Smit
  • 27,696
  • 33
  • 111
  • 170
  • Note that the 1000 octet limit includes the CRLF, so that means your line limit is actually only 998 octets. – jstedfast Apr 09 '15 at 02:23

1 Answers1

1

There is no way for 8bit to have longer lines, just like there is no way for 7bit to (legitimately) contain 8-bit characters. If you want arbitrarily long lines, the binary content type is available, but the standard, robust approach is to use a content-transfer-encoding such as quoted-printable or base64. Then the content within the encoding can be completely free-form.

tripleee
  • 175,061
  • 34
  • 275
  • 318