Outlook auto clean function (remove extra line breaks)

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

Anyone *any* idea how the auto clean function works in Outlook - it removes
the hard line breaks added by email systems to conform the old 78 character
line limit of internet emails in plain/text portion of emails.

It works pretty well and I'm writing my own email parser and haven't a clue
what algorithm it's using. Very clever!!

Cheers, Rob.
 
it doesn't really clean them - it ignores them so the message text wraps and
you can choose to use them if the wrapping is bad. I'm not sure what you
mean about the 78 character line limit - it allows the paragraph to wrap
within the window, regardless of window size.
 
you can choose to use them if the wrapping is bad. I'm not sure what you
mean about the 78 character line limit - it allows the paragraph to wrap
within the window, regardless of window size.

The internet email RFC at some point in the past states that no line must be
longer than 78 characters. Many POP3/SMTP systems add CRLF into the text
message to comply with this which is why Outlook has the "auto clean"
feature whereby some clever logic tries to infer which CRLF have been added
by the email gateways.

I'm going to try parsing the HMTL portion of the email if it's present which
doesn't suffer from the same problem as HTML lines are encapsulated by <P>
and </P> tags. Line breaks don't matter to HTML.

Cheers, Rob.
 
Back
Top