[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sending mail from bash scripts



<quote who="Matthew Daubenspeck">
> Is there any easy way to send a message complete with subject and
> body from  a bash script? I want to run something simple from cron,
> but can't seem to  get the format down just right...
>

what about
echo "my message" | mail -s "my subject" my@email.address

many of my bash scripts output log stuff to a dedicated text
file then i email it via cat:
cat filename | mail -s "my subject" my@email.address

is this what your asking??

nate





Reply to: