Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sql Spool File and mailx

2 views
Skip to first unread message

sjsean

unread,
Jun 19, 2009, 6:07:09 PM6/19/09
to
I want to take a spooled file from Oracle and rather than attach to an
email and send I want the spooled file to be my message body.
Everything I have tried results in an attachment rather than in the
body. Below is my last attempt at code.

#!/bin/bash
###############################################################################
#
HOME=/home/support/jobs
EMAILS=email goes here
export ORACLE_HOME=/u01/app/oracle/product/9.2.0
export TNS_ADMIN=/var/opt/oracle
cd $HOME
$ORACLE_HOME/bin/sqlplus -s /nolog @/home/support/jobs/
package_delete_mail.sql

#echo `date` | mail -s "Deleted Package Report:`date`" -a $HOME/
package_delete_log.txt $EMAILS

cat package_delete_log.txt | mailx -s "Deleted Package Report" $EMAILS

exit

I tested with just making a text file and some lines which worked so I
am not understanding the difference. My two options are results in
the message body or as an attachment so please don't offer other
suggestions. Thanks.

Bill Marcum

unread,
Jun 20, 2009, 6:54:54 AM6/20/09
to
On 2009-06-19, sjsean <SJSea...@gmail.com> wrote:
>
>
> I want to take a spooled file from Oracle and rather than attach to an
> email and send I want the spooled file to be my message body.
> Everything I have tried results in an attachment rather than in the
> body. Below is my last attempt at code.
>
What mail client are you using to read the received mail? Maybe your
client "sees" an attachment when it isn't one, or maybe the file is
made into an attachment because it contains long lines and/or non-ascii
characters. Can you post a sample of the mail headers and the first few
lines of the mail?


0 new messages