Thomas,

Thursday, February 13, 2003, 9:44:07 AM, you wrote:

M> All,

M> I'm trying to send an email attachment (Oracle Tablespace Report) from a Sun
M> Unix box to myself when the batch job runs.

M> Anybody been able to do this?  I can send the text of the file, but what I
M> really want to do is to send the file (it's an Excel Spreadsheet).

The trick is to uuencode it. Here's a snippet from a shell script I
use to convert an HTML document with images to a .pdf and mail it to
myself:

  echo "Latency graphs for" `date` > /tmp/mailphcsc.$$
  echo " " >>/tmp/mailphcsc.$$
  htmldoc --webpage -f /tmp/latencyphcsc.pdf latencyphcsc.html
  uuencode /tmp/latencyphcsc.pdf latencyphcsc.pdf >>/tmp/mailphcsc.$$
  cat /tmp/mailphcsc.$$ | mailx -s "Latency Graphs" [EMAIL PROTECTED]

I'm using a tmp file since I'm adding text around the attachment. It
can probably be done with just a:

  cat spreadsheet.xls | uuencode spreadsheet.xls  | mail \
    [EMAIL PROTECTED]
 
-rje

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Robert Eskridge
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to