Sponsored Content
Top Forums 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 Post 302408596 by mani_isha on Tuesday 30th of March 2010 03:37:34 AM
Old 03-30-2010
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...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send an attachment and html text both in the same mail

Hi all, I am working on UNIX (Solaris28). I would like to send an email in which the body will be in html format and, in the same mail, a xls file has to be attached. I have tried this: the file is correctly attached but the body comes as html source and not formatted. If I do not attach the... (4 Replies)
Discussion started by: stefan.yu
4 Replies

2. 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

3. AIX

Command line/Script to send E-mail with HTML body and binary attachment

I apoligize for the cross-post but I'm not getting much in the way of help in the dummies forum: 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... (3 Replies)
Discussion started by: G-Man
3 Replies

4. Shell Programming and Scripting

Sending HTML attachment through mail

Hi I am new to unix and scripting.I am trying to send a html file as an attachment. SUBJECT="Type of Exceptions in Application" TO=Sushovan.Samals@gmail.com SPOOLFILE=/data/reg/tlogs/Monitor.html #echo "Send the E-mail message..." uuencode $SPOOLFILE $SPOOLFILE | mailx -s "$SUBJECT" $TO... (2 Replies)
Discussion started by: sushovan
2 Replies

5. UNIX for Advanced & Expert Users

how to send file as attachment with mail ?

hello , i m new to linux/unix , well in my college their is linux server to which we all (i and my frnds) login , we can send mail to each other through command "mail" . but any one can tell me how can i attached a binary file with mail. we are using red hat , "pine ", "mailx" , all... (2 Replies)
Discussion started by: alert_every1
2 Replies

6. Shell Programming and Scripting

Reading Delimited file and send mail with attachment

Hi All, My requirement is: 1. To read a file that contains log file location and server name. The format of the file is something like this : server_name1:logfilename1 server_name2:logfilename2 2. Now I wants to grep "error" string from the logfilename and put it into another file for... (3 Replies)
Discussion started by: acheiver
3 Replies

7. UNIX for Advanced & Expert Users

how to send file as attachment using mail or mailx

I have a need to send a file from the unix command line to be sent as an attachment. Is this possible? That is when I open my outlook email I need to file to appear as an attachment. Also, is there a way to use the mail binary (not mailx) to modify the "reply address". mailx -r works but I need... (1 Reply)
Discussion started by: kieranfoley
1 Replies

8. Shell Programming and Scripting

Unable to send mail with inline html along with attachment. Please help!

The below code is not working. I am able to send only inline html or only attachment. When trying to do both, only inline html is sent without attachment. Please help! #!/bin/ksh (echo "Subject: Test Mail - HTML Format" echo "MIME-Version: 1.0" echo "Content-Type: text/html" echo... (1 Reply)
Discussion started by: thulasidharan2k
1 Replies

9. Shell Programming and Scripting

Need help in sending html mail with attachment

Hi Everyone, I am facing problems in sending html mail with attachemnt. I will able to send mail with attachment (plain text ) using mailx -s and uuencode command and also html mail without attachment using sendmail option. However I am not able to send html mail along with attachment.Either... (2 Replies)
Discussion started by: karthik adiga
2 Replies

10. 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
SET 
CONSTRAINTS(7) PostgreSQL 9.2.7 Documentation SET CONSTRAINTS(7) NAME
SET_CONSTRAINTS - set constraint check timing for the current transaction SYNOPSIS
SET CONSTRAINTS { ALL | name [, ...] } { DEFERRED | IMMEDIATE } DESCRIPTION
SET CONSTRAINTS sets the behavior of constraint checking within the current transaction. IMMEDIATE constraints are checked at the end of each statement. DEFERRED constraints are not checked until transaction commit. Each constraint has its own IMMEDIATE or DEFERRED mode. Upon creation, a constraint is given one of three characteristics: DEFERRABLE INITIALLY DEFERRED, DEFERRABLE INITIALLY IMMEDIATE, or NOT DEFERRABLE. The third class is always IMMEDIATE and is not affected by the SET CONSTRAINTS command. The first two classes start every transaction in the indicated mode, but their behavior can be changed within a transaction by SET CONSTRAINTS. SET CONSTRAINTS with a list of constraint names changes the mode of just those constraints (which must all be deferrable). Each constraint name can be schema-qualified. The current schema search path is used to find the first matching name if no schema name is specified. SET CONSTRAINTS ALL changes the mode of all deferrable constraints. When SET CONSTRAINTS changes the mode of a constraint from DEFERRED to IMMEDIATE, the new mode takes effect retroactively: any outstanding data modifications that would have been checked at the end of the transaction are instead checked during the execution of the SET CONSTRAINTS command. If any such constraint is violated, the SET CONSTRAINTS fails (and does not change the constraint mode). Thus, SET CONSTRAINTS can be used to force checking of constraints to occur at a specific point in a transaction. Currently, only UNIQUE, PRIMARY KEY, REFERENCES (foreign key), and EXCLUDE constraints are affected by this setting. NOT NULL and CHECK constraints are always checked immediately when a row is inserted or modified (not at the end of the statement). Uniqueness and exclusion constraints that have not been declared DEFERRABLE are also checked immediately. The firing of triggers that are declared as "constraint triggers" is also controlled by this setting -- they fire at the same time that the associated constraint should be checked. NOTES
Because PostgreSQL does not require constraint names to be unique within a schema (but only per-table), it is possible that there is more than one match for a specified constraint name. In this case SET CONSTRAINTS will act on all matches. For a non-schema-qualified name, once a match or matches have been found in some schema in the search path, schemas appearing later in the path are not searched. This command only alters the behavior of constraints within the current transaction. Thus, if you execute this command outside of a transaction block (BEGIN/COMMIT pair), it will not appear to have any effect. COMPATIBILITY
This command complies with the behavior defined in the SQL standard, except for the limitation that, in PostgreSQL, it does not apply to NOT NULL and CHECK constraints. Also, PostgreSQL checks non-deferrable uniqueness constraints immediately, not at end of statement as the standard would suggest. PostgreSQL 9.2.7 2014-02-17 SET CONSTRAINTS(7)
All times are GMT -4. The time now is 05:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy