Operating System - HP-UX
1845965 Members
3603 Online
110251 Solutions
New Discussion

Re: Sending .gz attachments to outlook

 
SOLVED
Go to solution
Cameron_13
Occasional Advisor

Sending .gz attachments to outlook

I am trying to attach a file /tmp/test.$$.gz to an e-mail that is sent to a clients outlook mailbox when a job is done. Right now I am just getting garbage sent. I also get this when I run my script that sends the e-mail.
Text has 8BIT data and charset=US-ASCII, using charset=UNKNOWN-8BIT instead.

Any ideas?
14 REPLIES 14
Nicolas Dumeige
Esteemed Contributor

Re: Sending .gz attachments to outlook

Hello,

We use the attached script.

Cheers

Nicolas
All different, all Unix
Mark Grant
Honored Contributor
Solution

Re: Sending .gz attachments to outlook

You could always "uuencode" it
Never preceed any demonstration with anything more predictive than "watch this"
Cameron_13
Occasional Advisor

Re: Sending .gz attachments to outlook

Mark,

I found when I tried that there was nothing on the ohter end to decode it.
Jeff_Traigle
Honored Contributor

Re: Sending .gz attachments to outlook

Outlook expects MIME messages, I'm sure. Instead of piping uuencoded files into mail or mailx (which would be the traditional method), try elm, which supports MIME format for non-text mail, in file mode. Something like

elm -s Subject user@domain < file

might interact with Outlook a little better.
--
Jeff Traigle
Cameron_13
Occasional Advisor

Re: Sending .gz attachments to outlook

Jeff,

When I use that method I recive the following in my mail box

Text has 8BIT data and charset=US-ASCII, using charset=UNKNOWN-8BIT instead.
Sending mail...
Mail sent!


⠹ ù⠡@ archcomp.2986
à ± à 0 à >Sü è$; ¤cv@ â ¦Ë â ¹Ã¥Å Ã­Ã¸ Ÿ ðîà fà > kTkxvY»ž0çâ *][L
¦« =â çó# î[ à àx"
Cameron_13
Occasional Advisor

Re: Sending .gz attachments to outlook

Nicolas,

I looked through your script and tried to run it using the this command

94508.sh -tccunning@epcor.ca -sattachtest -b/tmp/archcomp.238.gz

the process seems to hang. Am I using this wrong?
Geoff Wild
Honored Contributor

Re: Sending .gz attachments to outlook

Best thing to use - mpack:

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

Mpack and munpack are utilities for encoding and decoding
(respectively) binary files in MIME (Multipurpose Internet Mail
Extensions) format mail messages.

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.
Steven E. Protter
Exalted Contributor

Re: Sending .gz attachments to outlook

I'm in HP education center today or i'd just attach a script. My script is called mailfile or mailfile2. Its attached todozens of my forum posts.

It does exactly what you want and deals with these issues nicely.

Do check your firewall that its fully patched, especially if symanntec had anything to do with it.

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
Nicolas Dumeige
Esteemed Contributor

Re: Sending .gz attachments to outlook

Cameron

append this to the end of command :
< /dev/null

Regards

Nicolas
All different, all Unix
Nicolas Dumeige
Esteemed Contributor

Re: Sending .gz attachments to outlook

1) There're example at the begining of the shell :

mail_files Dave.Wotton -b file9.gif t*.htm < /dev/null

2) I realize that I did't say that I did'nt write the script. Don't remeber where I got it, could be on ITRC ;-D

Nicolas
All different, all Unix
Cameron_13
Occasional Advisor

Re: Sending .gz attachments to outlook

I now have the .gx attachment being sent with my e-mail. Thanks guys. But one more question. When i open the attached file all the spaces have been removed. Is there anyway I can stop this?
Rita C Workman
Honored Contributor

Re: Sending .gz attachments to outlook

It might be something similar to what happens to binary files when they are mailed as attachments....
...when your sending mail (binary) over the internet via smtp everything has to be set to 7bit. So it gets converted from the 8bit (you) to 7bit over the internet and then it needs to be converted back to 8bit.

I've never had the need to send gz files to an Outlook mailbox. Maybe it just needs some kind of MIME decoder to set things back in original order, like binary files do.

Just a thought....for what it's worth,
Rita

Robert A. Pierce
Frequent Advisor

Re: Sending .gz attachments to outlook


This is how I do it.

To send all *.gz files in a directory to my Windows box:

$ for FILE in *.gz ; do
> uuencode $FILE $FILE done
> done | elm -s"Testing" my_address
mail sent!

That works for me in Outlook 97 and Outlook 2002, using X-Mailer: Elm [revision: 212.5]


Hope this helps

Rob
Robert A. Pierce
Frequent Advisor

Re: Sending .gz attachments to outlook

Mark Grant wrote:

> You could always "uuencode" it

Cameron replied:

>I found when I tried that there was nothing
>on the ohter end to decode it.

WinZip will uudecode files with a .uu extension.

If you do this:

uuencode myfile myfile.uu | elm -s"UU file" myaddress

then you should be able to open the file with WinZip on a windows box.

Rob