Operating System - HP-UX
1748241 Members
3926 Online
108759 Solutions
New Discussion юеВ

Re: how to save pdf attachment

 
SOLVED
Go to solution
Tuan Nguyen
Regular Advisor

how to save pdf attachment

Hello experts,

platform: hp9000 rp4440
OS: 11i
elm version 2.4

I am trying to save a pdf attachment in my mailbox /var/mail/tuan to my home directory as I receive the mail automatically.

If I run elm interactive mode, elm will ask if I want to save the attached file. I have 3 attached pdf files but elm only save the last one. I don't know why.

Please help me with this...

Thank you,

Tuan N Nguyen
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: how to save pdf attachment

Shalom,

You need to create the pdf attachment with a program like open office that can do such work.

Then try this script for doing the attachment part:

http://www.hpux.ws/?p=7

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
Tuan Nguyen
Regular Advisor

Re: how to save pdf attachment

Steven,

I thank you very much for your super quick response. Really appreciate your help.

I already received an email in my mailbox. All I want to do is to be able to save the pdf files attached into my home directory.

I think that the script you sent me is for sending mail out.

Anymore ideas ...

Thank you very much for your help.

Tuan N Nguyen
Steven Schweda
Honored Contributor
Solution

Re: how to save pdf attachment

I don't actually do this, so I know nothing,
but I'd look for a utility named "mpack",
which should include "munpack", and see if
that will do part of what you want. I
suspect that you'll need to extract the
(MIME-encoded) e-mail message from your
mailbox file first.

Automatic processing of incoming e-mail
messages is another question. The usual
forward-to-a-pipe method is easy enough when
you want to process _all_ the e-mail sent to
a particular address. ("man aliases", look
for "|".)
Dennis Handly
Acclaimed Contributor

Re: how to save pdf attachment

I just use mailx to save to my thunderbird folder and use either save each one or use AE extract to do them all.

Steven mentioned munpack. You can also use "mimencode -u" to extra parts, gotten by vi.
Tuan Nguyen
Regular Advisor

Re: how to save pdf attachment

Steven Schweda and Dennis,

Thank you very much for your directions. I am eventually able to save the attached pdf by using metamail.

First, I write a script to extract the pdf section from my mail file to a text file and use

metamail -B -d -z /tmp/textfile

the pdf is saved in /tmp

Thanks again for all your help.

Tuan Nguyen

Tuan Nguyen
Regular Advisor

Re: how to save pdf attachment

Again, thank you very much for all your help.
I really appreciate it.

Tuan Nguyen