I'm using bash script. I want to send an email with sendmail, using one file as the body and adding another file as an attachment. How do I do this? I have figured out how to send the first file as the email body ...
#Send the email
cat - $TFILE1 <<END | /usr/sbin/sendmail -- $to_email
Subject: $subject
To: $to_email
END
but I can't figure out how I would adjust the above to include a second file (say that its stored in $TFILE2), as an attachment?