Sponsored Content
Full Discussion: HTML mail formating in UNIX
Top Forums Shell Programming and Scripting HTML mail formating in UNIX Post 302828767 by mohanalakshmi on Wednesday 3rd of July 2013 06:14:32 AM
Old 07-03-2013
HTML mail formating in UNIX

Hi i need to send mail from my Unix server i used the below code.
Code:
From: TTS.OO.Monitoring.Operations
Subject: Error
X-Mailer: htmlmail 1.0
Mime-Version: 1.0
Content-Type: text/html; charset=US-ASCII
<HTML><head><style type='text/css'>
table.altrowstable { font-family: verdana,arial,sans-serif; font-size:13px; color:#333333 }
table.altrowstable th { border-width: 2px; border-style: solid; border-color: #a9c6c9; }
table.altrowstable td { border-width: 2px; border-style: solid; border-color: #a9c6c9; }
.oddrowcolor{ background-color:#d4e3e5;}
.evenrowcolor{ background-color:#c3dde0; }
</style></head><Body>
Hi All,
 
<BR></BR>
<TABLE class='altrowstable' id='alternatecolor'>
<TR bgcolor='#FFFF99' >
<TD>
TIMESTAMP     |        ORDERNO     |          SHIP_ADV_NO        |           REASON          | EMPTY FIELDS
*******************************************************************************************************************************
2012-04-24      |       10739022730     |       1027699274      |       PersonInfoShipTO details missing        |       FirstName,LastName,
-------------------------------------------------------------------------------------------------------------------------------
2012-04-24      |       10739022730     |       1027699275      |       PersonInfoShipTO details missing        |       FirstName,LastName,
-------------------------------------------------------------------------------------------------------------------------------
2012-04-24      |       10739022730     |       1027699276      |       PersonInfoShipTO details missing        |       FirstName,LastName,
</TD></TR>
</TABLE>
<BR></BR>
 
Thanks,
</body>    </html>
Online Ops-OMS Support

my output is
Code:
Hi All, 
 

 
TIMESTAMP | ORDERNO | SHIP_ADV_NO | REASON | EMPTY FIELDS ******************************************************************************************************************************* 2012-04-24 | 10739022730 | 1027699274 | PersonInfoShipTO details missing | FirstName,LastName, ------------------------------------------------------------------------------------------------------------------------------- 2012-04-24 | 10739022730 | 1027699275 | PersonInfoShipTO details missing | FirstName,LastName, ------------------------------------------------------------------------------------------------------------------------------- 2012-04-24 | 10739022730 | 1027699276 | PersonInfoShipTO details missing | FirstName,LastName, 
 
 
 
Thanks, 
Online Ops-OMS Support 

in the output i need some formatting.I am getting the extra ----------- in the mail i just need lines one below the one.

Code:
TIMESTAMP     |        ORDERNO     |          SHIP_ADV_NO        |           REASON          | EMPTY FIELDS     
*******************************************************************************************************************************
2012-04-24          |              10739022730      |              1027699274         |              PersonInfoShipTO details missing             |                FirstName,LastName,
-------------------------------------------------------------------------------------------------------------------------------
2012-04-24          |              10739022730      |              1027699275         |              PersonInfoShipTO details missing             |                FirstName,LastName,
-------------------------------------------------------------------------------------------------------------------------------
2012-04-24          |              10739022730      |              1027699276         |              PersonInfoShipTO details missing             |                FirstName,LastName,

I need formatted output.newline inside the Body tag is not identified it seems.Please hel[p me guys.
my OS version is
SunOS wapsx001 5.10 Generic_147147-26 sun4v sparc SUNW,Sun-Fire-T200
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can I write a HTML file in UNIX and sent it as a body of a mail

Hi, How can I write a HTML file in Unix. Once I do that, I want to send this file as a body of a mail, along with writing a subject for the mail I am sending through unix. How can that be done? (0 Replies)
Discussion started by: diwa81
0 Replies

2. Shell Programming and Scripting

Sending mail from Unix - For html output

I have automated some checks - and I want to send a email when there is an issue. This is fine and I can send the email. However - I want to generate the email in html format so I can highlight any issues to a reader.. ie. If there is a disk space issue - then the email will highlight the... (2 Replies)
Discussion started by: frustrated1
2 Replies

3. Shell Programming and Scripting

mail: html content

hi guys, am required to prepare a report and mail it, to make it more appealing :p i wish to have content of mail in rich text format i.e html type with mailx how to specify the content type of mail body as html? Thanks in advance!!! rishi (2 Replies)
Discussion started by: RishiPahuja
2 Replies

4. UNIX for Dummies Questions & Answers

sending mail with html content

hi, I am new to unix. I need send html content as a mail from my sun-solaris2.6 work station. When I tried that the recipient gets it as html code with all the tags. any solutions? thanx in advance (2 Replies)
Discussion started by: gmchoudary
2 Replies

5. UNIX for Advanced & Expert Users

Mail x to HTML

Hi, i've build a script, 1: neon_script and the other 2:neon_mailing those to scripts i run with 3:neon_handmatig After that i get a mail in plain text in my mail box and i want it in html format. I already tried already a several things but nothings seems to work. Somebody got i idea how... (3 Replies)
Discussion started by: Rensen
3 Replies

6. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

7. Shell Programming and Scripting

How to mail a html file.?

Hi, Can anyone tell me how to mail a html file in unix? I have a HTML file which contains a table structure, and i want this table to be created in the mail body and mail it. Does anyone have any suggestions. (3 Replies)
Discussion started by: rocky88
3 Replies

8. Shell Programming and Scripting

Formating output in html

Hi Guys, I was searching and landed up something here only. This is the code and I want the formatted html in email but that is not working, anybody knows the reason why? #!/bin/sh set -x DATE=`date -u` # Print beginning of webpage function html_header { cat <<END ... (5 Replies)
Discussion started by: bluemind2005
5 Replies

9. Shell Programming and Scripting

HTML mail with Attachment

Hi, I am using the below code: #!/bin/ksh SUBJ="Send mail from Unix with file attachments" TO=sudha.viswanathan@jpmorgan.com CC=sudha.viswanathan@jpmorgan.com ( cat << ! To : ${TO} Subject : ${SUBJ} Cc : ${CC} ! cat << ! MIME-Version: 1.0 Content-Type: text/html `cat... (1 Reply)
Discussion started by: sudvishw
1 Replies

10. UNIX for Beginners Questions & Answers

awk HTML Conditional Formating

I am receiving the below output in text format. The output is converted to HTML table using the code mentioned below output in text LogDate DayOfWeek/Hours _0_ _1_ _2_ _3_ _4_ _5_ _6_ _7_ _8_ _9_ _10_ _11_ _12_ _13_ _14_ _15_ _16_ ... (3 Replies)
Discussion started by: Dumpi16
3 Replies
All times are GMT -4. The time now is 03:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy