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@nasaviation.com
RECIPIENTBCC=rsiddiqui@advancedoperations.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

Share This Post with Your Friends over Social Media!

About the Author Muhammad Rawish Siddiqui

Master in Computer Science and Post-Graduation in MIS. EDRP (EC-Council Disaster Recovery Professional), Security+, OCP 7.3, 10, 11g, 12c, 11i, R12, OCE 11i System Administration, Linux and RAC 10g, 11g, and OCS Performance Tuning. More than 18 years’ Information Technology consecutive hands-on experience, possess diversified business and technical background on a wide variety platforms, hardware and operating systems, in the Capacity of Sr. Team Lead Consultant, Sr. Database Administrator, Sr. Applications DBA, Sr. Resident Consultant and Manager Systems. Extensive experience in managing ERP environments and large Databases including Space Management, Backup and Recover, Performance Monitoring and Routine Tasks Automation. Started Oracle related Career from Oracle 6. Worked on 7, 8, 9i, 10g, 11g, 12c & e-Business 11.0.3, 11.5.9, 11.5.10.2, R12 and R12.2. Distinct Technical Jobs such as installation, migration, implementation, upgrade, cloning, and maintenance were performed dozen number of times. Security/Performance related Health Checks, RAC & Data Guard Implementation/Troubleshooting Switchover/Failover were also made during the tenure on the basis of As-When-Needed.

Leave a Comment:

2 comments
Ather Hussain says September 6, 2009

Dear Atul Bhai

we have requirement to send from finance Dept for bank guarantee.

The bank guarantee transaction is attached in Oracle R12 with due date.

so, How to configure mail server in Oracle R12 on linux 5.0, Kindly give the configuration and doc ID’s

Thanks
Ather Hussain
UAE.

Reply
Ankur Garg says October 9, 2009

Hi there,

It is difficult to send an attachment using sendmail.
Instead use the mail command to send attachments. But this command will not allow you to send email in a preformmated HTML format.

You need to combime the HTML features of sendmail command with the attachment commands of mail by breaking your mail using the mail boundary.

drop me an email at gullu1983@gmail.com if you want to send preformatted HTML mails from unix along with attachments.

Thanks,
Ankur

Reply
Add Your Reply

[i]
[i]