Operating System - HP-UX
1848537 Members
4699 Online
104033 Solutions
New Discussion

Attching a "zipped" tar file to mail message

 
Patrick_85
Occasional Contributor

Attching a "zipped" tar file to mail message

Hello, I would like to send an email to an Outlook client with a "zipped" tar file attached to the email. "uuencode" doesn't seem to like the tar format.

Anu ideas?

Thanks
13 REPLIES 13
A. Clay Stephenson
Acclaimed Contributor

Re: Attching a "zipped" tar file to mail message

Elm will work just fine from the command line and it's quite easy.

Within the body of your email add this:

------------------------------------

This is my text. How are you?


[include /tmp/myattach application/octet-stream base64]

This is some more text in the middle.

[include /tmp/myexcel.xls application/ms-excel base64]

This is a closing message in the email.

----------------------------------------



That will attach /tmp/myattach and /tmp/myexcel.xls. You can include multiple attachments using this method.



Then to use it from a script:
elm -s "My Subject" user@mailserver.com < myletter

Where myletter contains the attachment include statement as well as your message text. It is also necessary that you have a .elm directory
under the users home directory becuase unlike the interactive version of elm the command-line version will not create a .elm directory automatically.


You probably only need the first example using the "octet-stream".
If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor

Re: Attching a "zipped" tar file to mail message

This is what I have tested and worked for me. I'm sending this using elm to my MS Outlook. What you need to do is in your file , say "mydata.tar.Z" add this at the top of the file (as the header on the first line)

[include mydata.tar.Z application/octet-stream base64]

Then simply run ..

$ elm johndoe@outlook.com < mydata.tar.Z
Geoff Wild
Honored Contributor

Re: Attching a "zipped" tar file to mail message

Or you can install/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.
Hai Nguyen_1
Honored Contributor

Re: Attching a "zipped" tar file to mail message

Patrick,

You can try using the "elm" program interactively to send a tar file as an attachment. It is very intuitive, easy to use.

Hai
MANOJ SRIVASTAVA
Honored Contributor

Re: Attching a "zipped" tar file to mail message

Hi


mpack , elm can help you , you can get more of such handy tools at :


http://www.stokely.com/unix.sysadm.resources/email.html



Manoj Srivastava
Patrick_85
Occasional Contributor

Re: Attching a "zipped" tar file to mail message

Thank you.

The include string does not seem to work on my OS. I get an "include not found" message. Is this part of an add on to HP-UX?

Steven E. Protter
Exalted Contributor

Re: Attching a "zipped" tar file to mail message

This utility which is based on something I found on itrc will attach any file to a mail message.


Attached.

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
A. Clay Stephenson
Acclaimed Contributor

Re: Attching a "zipped" tar file to mail message

If you are running 10.20 then you need PHNE_24520 to support MIME enabled elm. There were also some patches to fix elm on 11.0 but 11.11 should be okay "out of the box".

It's REALLY a good idea to identify your OS when posing questions.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Attching a "zipped" tar file to mail message

If you are running 10.20 then you need PHNE_24520 to support MIME enabled elm. There were also some patches to fix elm on 11.0 but 11.11 should be okay "out of the box".

It's REALLY a good idea to identify your OS when posing questions.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Attching a "zipped" tar file to mail message

If you are running 10.20 then you need PHNE_24520 to support MIME enabled elm. There were also some patches to fix elm on 11.0 but 11.11 should be okay "out of the box".

It's REALLY a good idea to identify your OS when posing questions.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Attching a "zipped" tar file to mail message

If you are running 10.20 then you need PHNE_24520 to support MIME enabled elm. There were also some patches to fix elm on 11.0 but 11.11 should be okay "out of the box".

It's REALLY a good idea to identify your OS when posing questions.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Attching a "zipped" tar file to mail message

If you are running 10.20 then you need PHNE_24520 to support MIME enabled elm. There were also some patches to fix elm on 11.0 but 11.11 should be okay "out of the box".

It's REALLY a good idea to identify your OS when posing questions.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Attching a "zipped" tar file to mail message

It's rather difficult to know if something will work on your OS when you don't bother to identify the OS. Perhaps someone can "use the Force" or call their psychic, Miss Cleo, to identify your OS.


If you are running HP-UX 10.20 then you will need to install PHNE_24520 to MIME enable elm.
If it ain't broke, I can fix that.