Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail 1

Status
Not open for further replies.

IMAUser

Technical User
May 28, 2003
121
CH
Hi,
I need to send a mail from a UNIX box with an attachement. And as always this needs to be an automated process which runs without user input. I tried using sendmail but I didnt see an option for either subject, body or attachement.
Can someone help please.

Thnx
 
check the FAQs of forum80

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Try this...
Code:
export FILE=filetosend.txt
export DEST=someone@somewhere.com
export NAME=Joe

( cat <<-MSGTXT
Hello ${NAME},

Please see the attached file ${FILE}.

Yours truely, IMAUser

MSGTXT
uuencode ${FILE} ${FILE}
) | mailx -s &quot;File ${FILE} as of $(date)&quot; ${DEST}
Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top