Is there a way to embed images into the body of an email using linux commands like mutt or sendmail?
I used this
mutt -e \
For those looking to send emails with embedded images as part of the email using a bash script, I pieced this code together.
The email is started with these line:
EMAILBODY="echo \"Alarm went off! "
EMAILATTACH=""
Inside of a loop that defines each file to attach:
EMAILATTACH=$EMAILATTACH" -a /home/xyz/"$ID"/"$Event"/"$Frame"-capture.jpg"
EMAILBODY=$EMAILBODY"
"
After the loop, the email is completed with these lines:
EMAILBODY=$EMAILBODY"\" | mutt -e \"set content_type=text/html\" -s \"House Alarm went off!\""
EMAILSTRING=$EMAILBODY$EMAILATTACH" -- user@server.net"
eval $EMAILSTRING
My last hurdle is that when I receive this on my android phone (maybe the same on other browsers), it doesn't display the picture, only a small box (even after you have downloaded the attachments). It shows up fine in Outlook though.