Triggering a mail through Unix Script

81 views Asked by At

I am trying to prepare a unix script that can send a mail to Users if a certain condition mets or fails in the scripts. I know about ‘mailx’

echo ‘Condition met’ | mailx [email protected]

but instead of writing the mail body, I want to send the mail which I have stored in a path for eg.

Path: /prod/data/mail.txt

0

There are 0 answers