top | item 40432908

(no title)

kr0bat | 1 year ago

As mentioned, the SMTP protocol only allows for 1000 bytes of data per line. The author also mentions that they are sending html emails, which ignore line breaks.

So a message intended to be sent by an SMTP client:

DATA

Hello customer,<br>[978 characters] 27.00

Was erroneously formated into:

DATA

Hello customer,<br>[978 characters] 27

.00

.

The period after 27 will be removed. And this is how the html will be rendered.

Hello customer,

[Lots of text] 2700

discuss

order

jiveturkey|1 year ago

but html does not ignore line breaks. when part of body text, a run of whitespace (including newline) becomes a single whitespace when rendered.

so splitting 27.00 on the . becomes 27 00, because the CRLF is significant to the client.

you would want to split at whitespace, not at any other character -- unless you had a 999+ string of non-whitespace of course.

perhaps the author didn't know or didn't realize or thought it insignificant to his point that in addition there was a quoted-printable encoding, in which case i believe the trailing/mandatory CRLF can be made non significant for client rendering. personally i still would have split on actual whitespace. (well, i wouldn't have written an smtp client in the first place.)

f33d5173|1 year ago

Hmmmm, html doesn't ignore line breaks, it just treats them as any other whitespace, where a consecutive sequence is folded into a single space. 27 00 would still be quite confusing, of course

tingletech|1 year ago

I think the space character in the comment above is representing a new line on the wire.