1835947 Members
2512 Online
110088 Solutions
New Discussion

HP-UX mail client

 
SOLVED
Go to solution
GIRIJA SWAIN
Advisor

HP-UX mail client

Is there a hpux mail client which can be used to send mail with multiple attachments from the server? I am running HP-UX 11.00 and have sendmail configured. I can send out SMTP mails now. The requirement is, a perl/cell script will send out SMTP mails with 2 or 3 attachment.
GSS-PALO-ALTO
6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor

Re: HP-UX mail client

Hi,

You can use "mailx" for this purpose. For multiple files, enclose them in a single sub shell.

(uuencode file1 file1; uuencode file2 file2; uuencode file3 file3)|mailx -s "Attachments" your_id@yourdomain.com

or you can pipe them to a single file and then send that file as attachment

uuencode file1 file1 > attach
uuencode file2 file2 >> attach
uuencode file3 file3 >> attach

cat attach| mailx -s "attachments" your_id@yourdomain.com

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Dave La Mar
Honored Contributor

Re: HP-UX mail client

Though there are many posts on this, here is one of many samples:
Script to build the following file as to your preference, when finished execute the file.

mailx -m -s "Some Title" someone @somewhere.com <<-END
`ux2dos /path_to_attachment_file/file.name | uuencode Attachment_file_name.txt`
path_to_attachment_file2/file2.name | uuencode Attachment_file_name2.txt`

END

If you desire a body to the email as well, add a `cat file_contaning_body_message"

Regards,
DL
"I'm not dumb. I just have a command of thoroughly useless information."
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: HP-UX mail client

My favorite way is elm and it handles multiple attachments with text between them if you like very well.



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 sender's home directory becuase unlike the interactive version of elm, the command-line version will not create a .elm directory automatically.

Regards, Clay
If it ain't broke, I can fix that.
Dave La Mar
Honored Contributor

Re: HP-UX mail client

Sorry,

File was missing ux2dos on second entry.

`ux2dos path_to_attachment_file2/file2.name | uuencode Attachment_file_name2.txt`

dl
"I'm not dumb. I just have a command of thoroughly useless information."
GIRIJA SWAIN
Advisor

Re: HP-UX mail client

Hi,

Thank you all for your valuable inputs. I will try them.

Regards..
Girija
GSS-PALO-ALTO
Artyom Voronchihin
Respected Contributor

Re: HP-UX mail client

PINE is very powerful mail client for UNIX. You can get ported version at
http://hpux.cict.fr/hppd/hpux/Networking/Mail/pine-4.32/
"Intel inside" is not a label, it's a warning.