This question already has an answer here:
I have this
bash script that prepares and sends an email using SSMTP. The line that sends the message looks like this:
/usr/local/sbin/ssmtp -vvvv $recipients < $mail_file
$recipients: the recipient list $mail_file: the mail file
How would I attach a "/var/logs/foo.log to this mail? NB: An SSMTP-only solution is needed.