LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-07-2005, 01:49 PM   #1
grao75
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
Wink Sending HTML email via mailx


Hi!

I've an HTML document that I would like to send via mailx or any other unix mail utility. What needs to be done on to ensure that the the mail is displayed with the HTML highlighting rather just displaying the HTML code?

I don't want to send this file as an attachment. I want it to be in the body of the message. I tried mutt & metamail with no luck.

cat file.html | mailx joe@mydomain.com

Thanks in advance!

-Joe
 
Old 11-08-2005, 09:48 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

Although I don't like html mail, I've had a simular problem (sun box to windows outlook).

I solved it by including the content type and boundry settings in the file that's being piped to mailx.

This 'html.file' will show as html (in outlook, cannot test it with other html compliant mailreaders):

Code:
From: some.user@other.machine
Subject: Test
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="----_=_NextPart_000_01C5B90C.9F15F690"

------_=_NextPart_000_01C5B90C.9F15F690
Content-Type: text/html;
        charset="iso-8859-1"

<!DOCTYPE html PUBliC "-//W3C//DTD html 4.0 Transitional//EN">
<html>
  <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  </head>
  <body>
    <div>
      <b>
Testing 1 2 3.
     </b><br>
    </div>
  </body>
</html>
The first From is used if your reply adress needs to differ from the one that's automatically included. Usage is like you showed (cat file | nailx user@some.machine).

Hope this helps.
 
  


Reply


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
Sending attachments using mailx wolfman423 Linux - Newbie 0 10-14-2005 08:27 AM
sending html in kmail ka9qlq Mandriva 0 08-09-2004 05:24 PM
Composing and sending HTML mail from mailx stv_t Solaris / OpenSolaris 2 03-15-2004 03:23 PM
sending an html email pdelucia Linux - Newbie 1 09-05-2003 10:40 AM
sending an email to a email address after a perl operation meluser Programming 9 04-07-2003 01:26 PM


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

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