Reputation: 10470
I have a bash script that send an email like so ...
/bin/mailx -s "Unsatisfied dependencies report for the [$lc] YUM repo" [email protected] < /tmp/$prog.output
... when the email arrives to Outlook I get that stupid message about "Extra line breaks in this message were removed". I tried running unix2dos
on the /tmp/$prog.output
file but that results in the report being sent as binary attachment.
Is there anything I can do from my bash script to prevent the annoying "extra line break in this message were removed" message?
Upvotes: 3
Views: 4428
Reputation: 579
In my situation I was able to use awk
echo "$variable" | awk '{ print $0" " }' | mail -s ....
This reads every single line, and re-prints it with three spaces at the end. Outlook is now happy.
Upvotes: 3
Reputation: 1275
From the outlook documentation
"By default, the Auto Remove Line Breaks feature in Outlook is enabled. This causes the line breaks to be removed. Any two or more successive line breaks are not removed."
So maybe doubling up your new lines would avoid that.
Upvotes: 3