urgent: Not able to send the html formatted message from mailx


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting urgent: Not able to send the html formatted message from mailx
# 1  
Old 08-07-2012
Question urgent: Not able to send the html formatted message from mailx

HTML Code:
<html>
<body style=background-color:AliceBlue>
<p>Hi,<pre>please check the connectivity status of the server. <pre>
And find the server log file for more details. </p>
<h1><font size="4">SERVER <font color="red">111.111.11.1</font> IS NOT AVAILABLE IN ONLINE</font></h1>
<font color="red" size="2"><b>NOTE:Please dont reply to this mail , it is system generated mail!</b></font>
</p>
</body>
</html>
I am trying to setup the auto generated mail, from the unix system to all the used, but only plain text mail i am getting, is there any other utility other then mailx,becuase mailx not supporting html mail formate.
Please help on this..
# 2  
Old 08-07-2012
try sendmail

Code:
 
(
        echo "From: abc@abc.com" 
        echo "To: abc@abc.com"
        echo "MIME-Version: 1.0"
        echo "Subject: This is Test Mail"
        echo "Content-Type: text/html"
        cat /path/to/htmlfile
) | /usr/sbin/sendmail -t

# 3  
Old 08-07-2012
Question

Sendmail package is not available in my system, can help with mailx,or mutt,mail...
those will be help full
# 4  
Old 08-07-2012
Code:
 
mutt -e "set content_type=text/html" abc@abc.com -s "subject" < test.html

# 5  
Old 08-07-2012
Data I am getting the fallowing error while executing and mail still coming in plain text formate

Quote:
Error in command line: content_type=text/html: unknown command
# 6  
Old 08-07-2012
its because of your mutt is old version
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to send the email in formatted way

Legends, I have following entries in /tmp/a.txt file GAP Ric XEOJ181477500.W Flag2 5 Sym XEO1418J775-E msg SEQ_NO:159 db:5 diff 154 process msg GAP Ric XEOJ181400.W Flag2 19 Sym XE418J815-E msg SEQ_NO:101 db:5 diff 96 process msg GAP Ric XEOJ18140.W Flag2 18 Sym XEO18J855-E msg SEQ_NO:88... (21 Replies)
Discussion started by: sdosanjh
21 Replies

2. Shell Programming and Scripting

Email body not formatted with html and sendmail

Hi All, I am trying to send the contents of a file as email body. I am using html email and sendmail option of unix. I am using the below piece of code for the same : #!/usr/bin/ksh export MAILTO="email@domain.com" export SUBJECT="Report" export BODY="file_directory_path/test_file.txt"... (1 Reply)
Discussion started by: rockygsd
1 Replies

3. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

4. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

5. Shell Programming and Scripting

How to send message in html format using shell script

I want to send email message in html format using unix shell script. I use sendEmail command in my script to send email message. The syntaxt of the sendEmail command is as follows: $sendEmail -f <email> -t <email> -u $subject -s smtpserver:port -o message-file=html I should be able to... (1 Reply)
Discussion started by: baps
1 Replies

6. Shell Programming and Scripting

Generating a report -Formatted printing -Urgent

Hi, My aim is to generate a report using shell script. There are various formats fields coloumns etc. I want to print in a single line (row) but in different coloumn as given below: field1 field2 field3 field4 ....... ....... ...... ....... The spacing... (1 Reply)
Discussion started by: jisha
1 Replies

7. UNIX for Dummies Questions & Answers

AIX send mail with HTML message body and a binary attachment

I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements: 1. command line switch to specify file name containing message body in HTML format 2. command line switch to specify file name of a binary attachment 3. command line or input file to specify... (4 Replies)
Discussion started by: G-Man
4 Replies

8. UNIX for Dummies Questions & Answers

mailx error message : mailx: NUL changed to @

If I use the "Mail" link instead of the "mail" link to ../mailx I get this error. Mail so-n-so @whatever.com mailx: NUL changed to @ Unknown command: "postmaster" The email still goes through but i get the error. If I use "mail" it goes thru without the error. Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

9. Shell Programming and Scripting

Validating a formatted message

I'm trying to write a shell script that will validate a format of a data file we recieve every night. What I'm looking for is to ensure there are 8 pipes "|" before an email address and 9 pipes after the email address. I was also looking to do this in one of two ways - a) Grabbing random... (10 Replies)
Discussion started by: BrianOsburn
10 Replies
Login or Register to Ask a Question