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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to send e-mail message from a shell script ?

Status
Not open for further replies.

HenryMonster

Programmer
Feb 21, 2002
74
US
Hi All,

I am new to Linux/Unix...

How can I send and e-mail message (plain ascii file)
from a shell script (any shell is fine).

This e-mail should have a subject and potentially may
carry attachments.

Thank you in advance,

HenryMonster.
 
Here's how I do it.

mail -s &quot;subject&quot; emailaddress < $file

The subject can be a $subject and subject can be a file as well.

Do a man mail for more options

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top