Operating System - HP-UX
1844882 Members
3001 Online
110233 Solutions
New Discussion

executing mail command within a script to include attachments

 
SOLVED
Go to solution
Ted Mims
Occasional Advisor

executing mail command within a script to include attachments

 
5 REPLIES 5
Kevin Wright
Honored Contributor
Solution

Re: executing mail command within a script to include attachments

Not exactly sure of your question, but if looking for a way to do this, try this

uuencode file file|sendmail user@domain.com

There are several ways this can be done, this is just one way..the second instance of file can be in the form file.xls or whatever.
harry d brown jr
Honored Contributor

Re: executing mail command within a script to include attachments

Deshpande Prashant
Honored Contributor

Re: executing mail command within a script to include attachments

Hi
This is how I send attachments in emails from my hp boxes.

#uuencode file file1 |mailx -m -s "Heading for email"


Thanks.
Prashant
Take it as it comes.
A. Clay Stephenson
Acclaimed Contributor

Re: executing mail command within a script to include attachments

Hi Ted:

If you choose to use the 'elm' approach make sure that you create a .elm directory in the sender's home hirectory. The interactive version of elm will create it automatically but the command line version will not.

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

Re: executing mail command within a script to include attachments

Hi Ted,
#/usr/bin/uuencode file file1 |mailx -s "Heading for email"

With this you can attach any file. One of member already answered the question; but now woth this email you'll be 100% confirmed.

I appreciate this ITRC Forum member and higly reommended to read questions; most of the times they are the first who solved my problems.
Thanks
Zafar
Win/Win