I have a shell script that uses sendmail function to send email the code is as follows
mailalert(){
sendmail -F Sender-Name -it <<END_MESSAGE
To: [email protected]
Subject: Subject
Message
END_MESSAGE
}
It gets executed whenever I call this function. Now I have a text file which I want to send using sendmail as attachment or as message in the email it sends. How can I do that? I have tried alot of tricks but nothing seems to work. Please Help.