I have a script like this which sends html emails. I am trying to include images into my html emails. Is this possible ? File has to use this function. I'm not looking for some quick one liner instead of my function because of file manipulations I have done in my script. When I send out emails I back a [X] instead of my image.
Email function of my script.
#!/bin/bash
Email()
{
export MAILTO="ADC@aol.com"
export CONTENT="file"
export SUBJECT="Report"
(
echo "Subject: $SUBJECT"
echo "To : $MAILTO"
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
cat "$CONTENT"
) | /usr/sbin/sendmail $MAILTO
}
Email
File I am sending "file"
<html>
<body>
<img src="/home/admin/Afriendlycow.png">
</body>
</html>
I attempt to try just the file name instead of the path such as Afriendlycow.png but it does not work also.