Operating System - HP-UX
1820809 Members
4021 Online
109628 Solutions
New Discussion юеВ

How to add attachment using sendmail/mailx

 
SOLVED
Go to solution
Gary Yu
Super Advisor

How to add attachment using sendmail/mailx

Hello,

I created a cronjob to send some monitoring data files to an internet email account Monday, how can I add these files as attachment files(not inside the message body)

Thanks!
4 REPLIES 4
Craig Rants
Honored Contributor
Solution

Re: How to add attachment using sendmail/mailx

Gary,
Follow this thread.

Good Luck,
C

http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x62f2c6af36b7d5118ff10090279cd0f9,00.html
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Deshpande Prashant
Honored Contributor

Re: How to add attachment using sendmail/mailx

Hi
Try
/usr/bin/uuencode |mailx -m -s "Title for the email" email@address.com

If you want to send multiple files put above in a loop.

Thanks.
Prashant.
Take it as it comes.
Gary Yu
Super Advisor

Re: How to add attachment using sendmail/mailx

Thanks everyone for the prompt response, it works!

Actually, I'm sending out text files, and I don't know if there's uudecode or similar programs in Win2000, so I just did like this: cat file_name | mailx -s 'subject' name@host

Thanks again!
Gary