Operating System - HP-UX
1833874 Members
2257 Online
110063 Solutions
New Discussion

Re: I need to sent multiple .pdf files from UNIX to our mail server.

 
Reynaldo Torres
Advisor

I need to sent multiple .pdf files from UNIX to our mail server.

Please, I need your help. I need to know what kind of mail tool I could use in order to send multiple copies using "pdf"; in another words I have some jobs running under UNIX/Oracle and creates this "pdf" files that need to be sent to our customers through our email server as an attachment. I have tried elm, uuencode, mpack but I wasn't successfully sending multiple copies or reports only one attachment. When I used "uuencode" I was able to sent three copies but when I tried to opened them it gave me an error so I really don't know if it has to do with the settings of the mail server under NT or if I need to installed a latest version of Acrobat which right now I have Acrobat 4.0. As I mentioned before one attachment no problem and I can open it but the settings is for a single attachment using mpack. I will really appreciated if you can give me some input about what kind of tool would fit better my task and I will give high points to the best answer to my question.
Reynaldo Torres
3 REPLIES 3
Michael Tully
Honored Contributor

Re: I need to sent multiple .pdf files from UNIX to our mail server.

To send Mulitple PDF's in an email:

for i in `echo filename1 filename2 filename3 ...`
do
uuencode $i $i.pdf
done|mailx -m -s "test" fred@mailbox.com

If the filename already has 'pdf' at the end, then drop the ".pdf" after the second $i in the loop.

Anyone for a Mutiny ?
Kellogg Unix Team
Trusted Contributor

Re: I need to sent multiple .pdf files from UNIX to our mail server.

For the lack of information about such tool, I would store these pdf files in a folder and either -
a. transfer (ftp) them to a PC OR
b. make a samba share for that directory.

Then its just a matter of sending mail from your PC and include these files as attachments.

HTH
...Manjeet
work is fun ! (my manager is standing behind me!!)
A. Clay Stephenson
Acclaimed Contributor

Re: I need to sent multiple .pdf files from UNIX to our mail server.

Elm from the command line will absolutely do this:

In your text file, mytext.txt, do something like this:
==========================

Hello Fred,

This is some sample text.

Here is PDF File 1:

[include myfile1.pdf application octet-stream base64]

Here is PDF File 2:
[include myfile2.pdf application octet-stream base64]

Here is PDF File 3:
[include myfile3.pdf application octet-stream base64]

See you later, Fred

=======================

This will nicely include the files myfile1.pdf, myfile2.pdf, and myfile3.pdf with the text of your mail.

Now to send this:

elm -s "Hi Fred; Here at the PDF Files" "fred@somewhere.com" < mytext.txt.

You must first create a .elm directory in the sender's home directory because the command-line version of elm will not automatically create the directory. The .elm directory can be empty.

If it ain't broke, I can fix that.