1

This seems like a basic question and there are variations of it. I have a ONE-COLUMN html file (let us call it status.html).

I would like to send this file which has a few images as the BODY of an email. I would like to do this using the Linux command line, but I am unsure of how to proceed. I do not know how the images will get gobbled up and formatted accordingly (i.e. are the base64 or attachments).

The key part is that I want the images in the HTML file to be in the body of the email ...

Is the a way or a Linux tool that does just this?

<<<

4
  • 1
    echo "and have a good day" | mutt [email protected] -m "the page" -a file.html img*.jpg? Commented Apr 29, 2015 at 16:30
  • Thanks JJoao - I do not think this is the answer I am looking for. A HTML file would naturally include images (with the IMG tag). I am not interested in separately processing the images. I am though, would be interested in a tool that handles this, otherwise I may have to write my own tool (and base64 any images). Commented Apr 29, 2015 at 17:01
  • JJoao's suggestion using the Mutt mailclient is correct. Also, please clarify what you mean with "one-column HTML file". A HTML file is a text file and does not contain images; it merely references them via IMG tags. So if you are looking for a solution where you send a single HTML file and it contains images, this won't happen. Commented Apr 30, 2015 at 7:18
  • You are correct "-a" Attach a file to your message using MIME. When attaching single or multiple files, separating filenames and recipient addresses with "--" is mandatory, e.g. mutt -a image.jpg -- addr1 or mutt -a img.jpg *.png -- addr1 addr2. The -a option must be placed at the end of command line options. Commented May 5, 2015 at 20:17

1 Answer 1

2

"-a" Attach a file to your message using MIME. When attaching single or multiple files, separating filenames and recipient addresses with "--" is mandatory, e.g.

mutt -a image.jpg -- addr1 or mutt -a img.jpg *.png -- addr1 addr2. 

The -a option must be placed at the end of command line options. –

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.