I was trying to send a png file in a body of an email via command line. I have been using the following command:
uuencode file.png file.png| mail [email protected]
but it attaches the file in the mail, rather than embedding it in body. Could you please tell me how to send mail with png file embedded in mail ?
Thanks.
You want to create a mime HTML email a la:
How to embed images in email
Then take the headers (all the lines before the first boundary), remove them from that input and add them individually with the -a command after mail such as:
https://stackoverflow.com/a/12262421/2244213
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With