Unix/Linux Go Back    


UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

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

UNIX for Dummies Questions & Answers


Tags
mailx

 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 03-30-2010   -   Original Discussion by mani_isha
mani_isha's Unix or Linux Image
mani_isha mani_isha is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 13 June 2011, 1:12 AM EDT
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
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 .

Code:
cat Employee.sql 
 
SET VERIFY OFF
SET PAGESIZE 200

SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON -
HEAD "<TITLE>count of employeet</TITLE> -
"<STYLE type='text/css'> -
<!-- BODY {background: #FFFFC6} --> -
</STYLE>" -
BODY "TEXT='#FF00Ff'"-
TABLE "WIDTH='90%' BORDER='5' COLOR='#ffffff'"
SET MARKUP HTML ON ENTMAP ON
PROMPT <H> employee No </H>
PROMPT <H1> emp </H1>

spool Employee.html
SET MARKUP HTML ON ENTMAP OFF
PROMPT <H1> Report1  </H1>
SET MARKUP HTML ON ENTMAP ON
SET MARKUP HTML ON ENTMAP OFF
PROMPT <H> <B> Report2 </B>  </H>
SET MARKUP HTML ON ENTMAP ON
select count(*) from emp ;
SET MARKUP HTML ON ENTMAP OFF
PROMPT <P> </P>
spool off

exit


Then in another file1.sh on running this

Code:
#!/usr/bin/ksh
export MAIL_LIST='someone@gmail.com'

cd /home/bin
rm Employee.html
sqlplus username/passwordL@host @Employee.sql
(cat uuencode Employee.html )| mailx -s "Report" -m $MAIL_LIST

on running this html attachment is sended.
Biut i dont need the html atatchment , i need simailar tabular form it shouldcom eon the mail notes directly instead of one opening the attcahment .

please suggest.

Last edited by pludi; 03-30-2010 at 04:39 AM.. Reason: code tags, please...
Sponsored Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to send file as attachment using mail or mailx kieranfoley UNIX for Advanced & Expert Users 1 05-21-2009 08:45 AM
how to send file as attachment with mail ? alert_every1 UNIX for Advanced & Expert Users 2 08-17-2008 03:10 AM
Command line/Script to send E-mail with HTML body and binary attachment G-Man AIX 3 04-18-2007 10:30 PM
AIX send mail with HTML message body and a binary attachment G-Man UNIX for Dummies Questions & Answers 4 03-22-2007 03:15 PM
Send an attachment and html text both in the same mail stefan.yu Shell Programming and Scripting 4 10-26-2006 10:46 PM



All times are GMT -4. The time now is 01:40 PM.