Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-31-2005, 05:25 PM   #1
LQ Newbie
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
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?)

Old 11-02-2005, 03:16 AM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,460

Rep: Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471
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
Old 11-02-2005, 01:02 PM   #3
LQ Newbie
Registered: Oct 2005
Posts: 3

Original Poster
Rep: Reputation: 0
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?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send mail from command line buskmann Linux - Newbie 7 07-23-2006 10:18 PM
can i send mail from command line? iflorea Linux - Software 6 11-02-2005 07:08 AM
Command Line Send Mail nutthick Linux - Newbie 10 01-24-2005 07:52 PM
Java Mail fails to send a HTML mail eantoranz Programming 1 11-10-2004 01:47 PM
How to send an mime/html-email by command line ? fluppi Linux - Networking 0 07-08-2004 09:26 AM

All times are GMT -5. The time now is 08:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration