File Attachment in Linux using MAIL/SENDMAIL – How to Send eBusiness 11i/r12 DB Status on Daily Basis

Assumption

  • The rpm sharutils-4.2.1-17.i386.rpm is already there.
    • Verify the same, as followed: rpm –qa sharutil* 
    • If not, download and install sharutils-4.2.1-17.i386.rpm by the following, as it is mandatory: rpm -ivh sharutils-4.2.1-17.i386.rpm.
  • DB Check Script is already implemented and scheduled.

As root user, schedule the following script:

#!/bin/bash
FILE=dbchk.doc
FILE2=output.html
RECIPIENT=rawishsiddiqui@yahoo.ca
RECIPIENTCC=oracle@******.com
RECIPIENTBCC=rsiddiqui@*****.com

(
echo “Dear Concern! Review the enclosed and take the requisite Action, if needed.”
for i in `ls -1 $FILE`
do
file_name=`basename $i`
uuencode $i $file_name
done
for i in `ls -1 $FILE2`
do
file_name=`basename $i`
uuencode $i $file_name
done
) | mail -s “eBusiness 11i/r12 – Database Status” “$RECIPIENT” -c $RECIPIENTCC -b $RECIPIENTBCC

Comments are closed.

Scroll to Top