Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-26-2008, 06:46 AM   #1
LQ Newbie
Registered: Dec 2007
Posts: 25

Rep: Reputation: 15
mailbody to be html file

Hi Guys,

I am having a html file which i need to send as a mail body but this sends the file in text format.

I am using the mail and mutt command but both are not working.

cat <<mail.html>> | mail -s "hi" <<mailid>>

cat <<mail.html>> | mutt -s "hi> <<mailid>>
Old 08-27-2008, 12:13 AM   #2
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Include the -a option to have mutt MIME-encode the file as an attachment.

mutt -s "Hi" -a mail.html emailaddr

You don't need to use cat here - most programs can read from STDIN or accept a file argument.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send a html file as an file attachment to my mail from crontab? GRD Linux - Newbie 2 06-03-2008 11:39 AM
editing a very large HTML file (or, extracting URLs from a file) Chriswaterguy Linux - Software 3 11-27-2007 06:07 PM
LXer: Decompile .chm file to view as html file under Linux LXer Syndicated Linux News 0 01-28-2007 01:03 AM
how to import XML or HTML file into mediawiki file?? apzc2529 Linux - Server 0 11-10-2006 06:58 AM
Konqueror + file:/usr/share/doc/HTML/index.html jon_k Linux - Software 2 11-25-2003 05:06 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:37 AM.

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