-   Linux - General (
-   -   Send HTML mail via command line interface (

xlash 10-31-2005 05:25 PM

Send HTML mail via command line interface
I'm trying to send an HTML email, including JPEGS in it from command line.

I'm running a batch job which needs wo send periodically emails with the newest stats jpeg. Anybody knows how?

I can't find anything in the sendmail, mail/nail manual either.
P.S.: in the HTML document, does the img tag needs to refer to www, or it can refer to embedded jpegs? (If yes, how?)


bathory 11-02-2005 03:16 AM

Use mutt:

mutt -s "subject" -a image1.jpg -a image2.jpg -a page.html < /dev/null
You must use the -a option for any attached image, or html page

xlash 11-02-2005 01:02 PM

Thanks for suggesting an MIME email client.

However, I'm unable to send HTML ContentType.

With the -a options, it simply attach the file.

With the -i, it simply read the ASCII data into the file.

put as <, it display the ASCII.

I've try sending that mail first to myself@localhost, so I can check if the header for section 1 is correct, but it is not.

Any ideas?


All times are GMT -5. The time now is 09:29 PM.