This script will help you to send email with attachment to user through Shell Script program in Oracle R12 Application
Step1: First save below Shell Script as ’email.prog’ format and place into ‘CUSTOM_TOP/bin’ folder
!/bin/sh set -x echo off . /oracle/DEV/EBSapps.env run cd $APPLCSF/out echo $1 echo $2 echo $3 echo $4 echo $5 export parent_req=echo $6
echo $parent_req export email_id=$5 fpath=sqlplus -s apps/password << EOF set head off lines 500 select FILE_NAME from fnd_conc_req_outputs where concurrent_request_id=$parent_req; EXIT; EOF
id=username@oracle.ae export fname=echo $fpath|awk -F/ '{print $11}'
echo $fname echo "Dear Buyer Attached is the approved Service work order for further processing. Thanks & Regards,"|mail -r 'uat.oracle@oracle.com' -s "PO is approved." -a "$fname" "$5"
Step2: Create Executable and Concurrent Program with execution method ‘Host’ and file name should be ’email’ which is placed in ‘custom_top/bin’ folder



Step3: Assign this program to any responsibility and run the program to send email to user with attachment based on previously ran concurrent request id which has pdf output.

After submitting this program it will send an email to desired email address with pdf output as an attachment of ‘concurrent request id’ 123456