11-26-2010
Output will send in mail
Hi All,
Requirement is to select the data from database and send the output in mail. But the output should in HTML tabular format in mail body.
For example my select command is :
select ename,esal,edegn,dept from emp where deptno in (10,15);
In the mail body the output should :
Employee Detail Report :-
EmployeeName EmployeeSalary EmployeeDesignation Department
Roxen 120000 MGR Fin
Alexander 220000 SrMGR Fin
Sombrero 320000 MGR Mkt
Elnor 520000 MGR RD
Please tell me the script.
Thanks
Alex
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail.
actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies
2. Shell Programming and Scripting
how to run a script using cron job and send the output as attachment via e-mail using unix. please help me.
how my cron job entry should be?
As of now my cron job entry is to run the script at specific time,
15 03 * * * /path/sample.sh | mail -s "Logs" email_id
In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies
3. Shell Programming and Scripting
Hi All ,
i have a wrapper HTML script -FS_CHECK_HTML_SCIPT_WT_Statusbar.sh which read a TXT file (script_KB.txt) and sends output to a mail in tabular format. TXT file is having 6 columns and so wrapper script create a table with 6 columns and supplies those 6 columns data from TXT file .... (2 Replies)
Discussion started by: deepakiniimt
2 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I would like to send below output in a tabular column ( xml or excel ) and send a mail.
vinay unix
anil sql
vamsee java
request to suggest a solution. (1 Reply)
Discussion started by: Girish19
1 Replies
5. Shell Programming and Scripting
HI,
I have two scripts which is sending the mail in html format.
Script 1:
1.IFILE=/home/home01/Report.csv
if #Checks if file exists and readable
then
if awk -F, '{ T += $13 } END { exit(!T) }' ${IFILE}
then
awk -F, 'BEGIN{
c=split("3,4,8,9,13", col)
print "To:... (0 Replies)
Discussion started by: Vivekit82
0 Replies
6. Shell Programming and Scripting
Hi Guys,
I am not Good at scripting.
I need to write a script such that if output of command shows the particular word in output then send mail to abc@compay.com
-bash-3.2$ ps -ef | grep bpbkar
root 6040 1 0 13:05:19 ? 0:00 bpbkar -r 2678400 -ru root -dt 47395 -to 0... (20 Replies)
Discussion started by: manalisharmabe
20 Replies
7. Shell Programming and Scripting
#! /bin/ksh
#] && . ./.profile 2>/dev/null
if test -f '.profile'; then . ./.profile; fi;
#. .profile
LOG_DIR=/app/rpx/jobs/scripts/just/logs
sendEmail()
{
pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7"
(
... (21 Replies)
Discussion started by: ankit.mca.aaidu
21 Replies
8. Shell Programming and Scripting
Hi Guys,
I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
9. UNIX for Beginners Questions & Answers
Hi All,
I have a working script as below.
echo "Files loaded with $(cat /var/tmp/script.X1.out)" | mail -s "Files loaded with return code" mailid
This script takes the output from script.X1.out file and appends the text "Files loaded with return code" and sends the email. Now what I want... (5 Replies)
Discussion started by: midhun3108
5 Replies
10. UNIX for Advanced & Expert Users
I am having trouble getting mail to work on a red hat server. At first I was getting this message.
Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused
Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
LEARN ABOUT ULTRIX
mhmail
mhmail(1mh) mhmail(1mh)
Name
mhmail - send or read mail
Syntax
mhmail [ addrs ... ] [ options ]
Description
The program is intended as a replacement for the standard mail programs, and See and for more details of these mail programs. When invoked
without arguments, it simply invokes to incorporate new messages from the user's maildrop. When one or more users is specified, a message
is read from the standard input and spooled to a temporary file. then invokes with the name of the temporary file as its argument to
deliver the message to the specified user.
Normally, people will use and to send messages.
Options
-body text
Specifies the text of the message. If it is specified, then the standard input is not read.
-cc addrs Specifies addresses to be placed in the cc: field of the message.
-from addr
Specifies the content of the From: header of the draft. The address given is placed in the From: field of the message. The
Sender: field is filled in correctly by
-help Prints a list of the valid options for this command.
-mts smtp Specifies the mail system over which mail is sent. The only value allowed is smtp, which is the standard ULTRIX mail system.
Additional values are supported only for use with other mail systems.
-subject text
Provides the text of the Subject: field of the message.
Restrictions
Messages with a null body part will not be sent by You must include some body text in all messages to be sent by
For this version, the -mts option only supports the value smtp. Additional values are supported for use only with other mail systems.
Files
Program to incorporate a maildrop into a folder.
Program to deliver a message.
Temporary copy of message.
See Also
inc(1mh), post(8mh)
mhmail(1mh)