Operating System - HP-UX
1753485 Members
4285 Online
108794 Solutions
New Discussion юеВ

Re: problems sending file from HP-UX to Outlook as attachment

 
SOLVED
Go to solution
Lana Cameli
Advisor

problems sending file from HP-UX to Outlook as attachment

I have a plain text file that I am trying to send to Outlook as an attachment. I have used the following command:
uuencode file.txt file.txt|mailx -m -s "subjecttitle" whomever\@wherever.com

The file makes it through ok, and has appropriate file names and subject lines. However, when I open it (in Outlook) all data is on one line. the CR's completely disappear.

What can I do to retain file's original format and the CR's in an attachment?
8 REPLIES 8
Geoff Wild
Honored Contributor

Re: problems sending file from HP-UX to Outlook as attachment

Try zipping it?

Or try mpack:

http://hpux.ee.ualberta.ca/hppd/hpux/Users/mpack-1.6/

Run like so:

/usr/local/bin/mpack -s "svr004 cfg2html" /opt/cfg2html/svr004.html gwild@mydomian.ca


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Josh Dalziel
Occasional Advisor

Re: problems sending file from HP-UX to Outlook as attachment

you need to run unix2dos on the file before you send it so it can inser the ^M at the end of everyline
Steven E. Protter
Exalted Contributor

Re: problems sending file from HP-UX to Outlook as attachment

Shalom,

Could be an smtp relay server is mangling it. Make sure all smtp gateway servers are patched.

Could be the attchment needs to be build slightly differently.

See this script:

http://www.hpux.ws/mailfile2

Thats a well tested production script.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TwoProc
Honored Contributor
Solution

Re: problems sending file from HP-UX to Outlook as attachment

as someone posted before - you need to convert with unix2dos. It really doesn't have much to do with HOW you're sending the file, it's the fact that you're sending a file without CRLF combinations that most things "dos-sy" don't like. If you sent this file over the Windoze box via sftp, scp, a samba share, etc - the result would be the same.

Try this instead:

unix2dos file.txt | uuencode file.txt | mailx -m -s "subjecttitle"
We are the people our parents warned us about --Jimmy Buffett
Lana Cameli
Advisor

Re: problems sending file from HP-UX to Outlook as attachment

Thanks. I don't have unix2dos on my machine. Is it something I can download and install quickly?
Pete Randall
Outstanding Contributor

Re: problems sending file from HP-UX to Outlook as attachment

Try ux2dos - there's no such thing as unix2dos that I'm aware of.


Pete

Pete
Lana Cameli
Advisor

Re: problems sending file from HP-UX to Outlook as attachment

ux2dos worked like a charm! thanks John and Pete :)
TwoProc
Honored Contributor

Re: problems sending file from HP-UX to Outlook as attachment

Good catch Pete - sorry Lana.
We are the people our parents warned us about --Jimmy Buffett