By posner
Now i need to attache png file to the email and this attachment part is not working.
(
echo "From: $FROM"
echo "To: $TO"
echo "MIME-Version: 1.0"
echo "Subject: $SUBJECT"
echo 'Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw"'
#echo "Content-Disposition: inline"
echo ""
echo "--GvXjxJ+pjyke8COw"
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
cat TheMailer.html
echo ""
echo "--GvXjxJ+pjyke8COw"
echo "Content-Type: text/plain"
echo "Content-Disposition: attachement; filename=attachment_file.csv"
echo ""
cat attachment_file.csv
echo ""
echo "--GvXjxJ+pjyke8COw"
echo "Content-Type: image/png"
echo "Content-Disposition: attachment; filename="graph_file.png""
echo "Content-Transfer-Encoding: base64"
) | /usr/sbin/sendmail -t
TheMailer.html contains all my html command and its works good .
I get my email with plain text attachment but i don’t get the png attachment right , its just the file name with 0Kb
Appreciate your expert help in fixing this part
echo ""
echo "--GvXjxJ+pjyke8COw"
echo "Content-Type: image/png"
echo "Content-Disposition: attachment; filename="graph_file.png""
echo "Content-Transfer-Encoding: base64"
Thank you