How does Outlook identify "Extra Line Breaks"

6,298

Not sure about what it's looking for, but how about configuring Outlook to not remove them?

Tools -> Options -> Preferences Tab -> click E-mail Options button -> uncheck the box

Another option (albeit not ideal and maybe not even the case for your msgs):

  1. Open Outlook.
  2. Open the item.
  3. Click Format.
  4. Click to clear the Unwrap Text check mark.

And here's a post that says that a hack you can use would be to add 2 empty characters to the beginning of each line of text in order to make Outlook not remove the breaks.

Additionally see here for a better layout, add at least 3 spaces at the end of every line (incl. empty lines).

Share:
6,298

Related videos on Youtube

phirschybar
Author by

phirschybar

Updated on September 17, 2022

Comments

  • phirschybar
    phirschybar over 1 year

    I am writing a script that emails the output to me, and I read it in Outlook. For some reason Outlook removes all the line breaks in the message, and gives me a little notice that it has removed the extra line breaks from the message

    How can I fix my message so that Outlook doesn't remove the line breaks?

    • Outlook displays other messages fine (with correct line breaks)
    • I have tried all these things with sed - s/$/\r/ s/$/\n/ s/\r\n/\n/ s/\n\r/\n/ s/$/^M/ - with no luck

    What does Outlook expect at the end of a line?

    • yankeemike
      yankeemike almost 15 years
      I'm thinking.. shouldn't programming questions be posted in stackoverflow instead?
    • phirschybar
      phirschybar almost 15 years
      I put it here because I thought it would be more applicable to sysadmins than programmers.
  • pauska
    pauska almost 15 years
    He's asking how Outlook parses the mails, not how he can shut off the behaviour in Outlook.
  • squillman
    squillman almost 15 years
    Yeah, I know. But frequently other suggestions end up working better than the requested functionality. I also posted a hack more toward what he was asking.
  • David Mackintosh
    David Mackintosh almost 15 years
    Dude. The problem is "Outlook is misbehaving", not "the message is broken". Fix the Outlook problem.
  • David Mackintosh
    David Mackintosh almost 15 years
  • pauska
    pauska almost 15 years
    Ok - you edited and it looks a bit more helpful now, I'm taking my -1 back
  • phirschybar
    phirschybar almost 15 years
    That hack of adding 2 spaces to the beginning of each line works great! I just did sed "s/^/ /" before the mail command.
  • Peter Turner
    Peter Turner almost 15 years
    I think that's right, I had a similar problem with Pegasus mail. Make sure still generate line breaks because there is a maximum line length at which your line will just be truncated.
  • squillman
    squillman almost 15 years
    @pauska: BTW - Thanks for explaining the downvote earlier! Kinda bugs me when people don't do that...
  • Bernhard
    Bernhard over 3 years
    see stackoverflow.com/a/1638608/1498669 and add at least 3 spaces at the end - better for layout :)