attachment and single line using uuencode

I tried using the fllowing command to attach and email a file but the issue is the attach file drops the carriage return or line feed and all the rows appears in single line.

uuencode file.txt file.txt | mail user@gmail.com

Any solution guys

To save time, please tell us your Operating System and version, what mail system you are using on your server, and what mail reader had the trouble and what software displayed the attachment (e.g. Windows notepad)?

UNIX AIX and mail system is MS Office outlook ...the attachment opens up directly on the windows notepad

You should use a .wri extension on the UUencoded file (ie, your second file.txt should be file.wri), and it'll open up in Write...which renders the line feeds properly on a Windows machine...

Otherwise fluff the original text file to a temp file through unix2dos in order to place a newline pair like Windows wants to see. Note the following:

-> print "line\nline1\nline2" |od -c
0000000   l   i   n   e  \n   l   i   n   e   1  \n   l   i   n   e   2
0000020  \n
0000021

-> print "line\nline1\nline2" |unix2dos 2>/dev/null |od -c
0000000   l   i   n   e  \r  \n   l   i   n   e   1  \r  \n   l   i   n
0000020   e   2  \r  \n
0000024