sending text file as attachement to Windows (Outlook)
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix True 64 > sending text file as attachement to Windows (Outlook)




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    sending text file as attachement to Windows (Outlook)  
MB


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 11:50 PM

I would like to send a text file as an attachement to Windows outlook from
tru64 Unix.

# cat /tmp/file.txt | uuencode file.txt | mailx -s test someone@xzy.com

This works, however when you view the file in notepad it doesn't look right.

Can anyone help

Regards
M





[ Post a follow-up to this message ]



    Re: sending text file as attachement to Windows (Outlook)  
Paul Szabo


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 11:50 PM

MB wrote:
[QUOTE]
> I would like to send a text file as an attachement to Windows outlook from
> tru64 Unix.
>
> # cat /tmp/file.txt | uuencode file.txt | mailx -s test someone@xzy.com
>
> This works, however when you view the file in notepad it doesn't look right.[/QUOT
E]

I guess the problem is the line termination: a single NL character (hex 0A)
is used in UNIX, while Windows uses the two-character CR-LF (hex 0D 0A).
Replace cat by:

perl -pe 's/$/\r/' /tmp/file.txt | uuencode ...

--
Paul Szabo - psz@maths.usyd.edu.au  http://www.maths.usyd.edu.au:8000/u/psz/
School of Mathematics and Statistics  university of Sydney   2006  Australia





[ Post a follow-up to this message ]



    Re: sending text file as attachement to Windows (Outlook)  
Joseph Dionne


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 11:50 PM

And for those non-perl users;

cat /tmp/file.txt | sed -e "s/$/^M/" | uuencode ...

"^M" enter with Ctrl-V, Ctrl-M



Paul Szabo wrote:
quote:
> MB wrote: > > > > > I guess the problem is the line termination: a single NL character (hex 0A ) > is used in UNIX, while Windows uses the two-character CR-LF (hex 0D 0A). > Replace cat by: > > PERL -pe 's/$/\r/' /tmp/file.txt | uuencode ... >




[ Post a follow-up to this message ]



    Re: sending text file as attachement to Windows (Outlook)  
Adam Price


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 11:50 PM

In news:1d08b916.0312040633.41aa5475@posting.google.com,
MB <mb301@hotmail.com> typed:
quote:
> I would like to send a text file as an attachement to Windows > outlook from tru64 Unix. > > # cat /tmp/file.txt | uuencode file.txt | mailx -s test > someone@xzy.com > > This works, however when you view the file in notepad it doesn't > look right. > > Can anyone help > > Regards > M
uuencode file.wri < file.txt | mailx -s test This causes the file to open in wordpad instead, wordpad can handle unix line-termination just fine and the file looks OK. Hope this helps Adam




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:34 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register