Oracle Cloud offers a broad portfolio of software as a service applications, platform as a service, and social capabilities, all on a subscription basis. Oracle Cloud delivers instant value and productivity for end users, administrators, and developers alike through functionally rich, integrated, secure, enterprise cloud services.
 Get a Free Magzine ...Profit:The Executive's Guide to Oracle Applications

Subscribe to the OracleAppsHub to receive notifications when there are new posts:

 get RSS feed
 Oracle Fusion Applications (OFA) is a portfolio of next generation suite of software applications from Oracle Corporation. It is distributed across various product families; including financial management, human capital management, customer relationship management, supply chain management, procurement, governance, and project portfolio management
 Get a Free Magzine ...Profit:The Executive's Guide to Oracle Applications

Email Options from EBS

Posted on September 22nd, 2007 by Sanjit Anand ||Email This Post Email This Post

Have you tried OracleappsHub in ipad/iphone/smart Phone? Don't wait. try it today

Couple of options are available in Oracle E Business, where you get use of mailing facility directly from Oracle E Business.

Many times there is similar kind of requirement wherein we need to send the output of a Concurrent Program as an attachment with an mail to a Distribution list, or just a notification by email. Lets explore some of the options :

1.Options 1 :Mail_by_Unix_script

This Options is used by use of Unix script plus some steps required in oracle apps.

1. Write a script like ,

mailx -s “$3” $email_addr $1
exit 0


2.Define printer styles

3. Define a printer driver to call script in the arguments field


4. Assign printer to the print styles and the driver

5. Register the e-mail printer

6. Default your report use the e-mail printer

Example of above:

Requirement is to send a report as attachment.

Assuming Printer configration 2,5 you have done in EBS.

filedate=`date “+%m%d%y”`
senddate=`date “+%x”`
sendtime=`date “+%X”`
report=`echo $1`
title=`echo $2`
username=`echo $3`
ux2dos $report /tmp/”$username”.tmp
uuencode /tmp/”$username”.tmp “$username”.txt | mailx -ms “Oracle Report:
$title sent on $senddate at $sendtime” “$username”
rm -f /tmp”$username”.tmp

2. Options 2: Report + utl_mail

You can define a host concurrrent program to send the output of the request in mail and call this concurrent program in
the “after report” trigger of your report.

So once your report completes it automatically call the host concurrent program to send the output of the report. You should
get your report concurrent program id form P_CONC_REQUEST_ID parameter and pass it to the host file to select the output file.

The bad thing is that this options has limitation of output file is less than 32kb , if this is case then you can use the following code in your after report trigger

function AfterReport return boolean is


vinhandle UTL_FILE.file_type;
rfile RAW (32767);
flen NUMBER;
bsize NUMBER;
vrec VARCHAR2 (30) := ‘’; –receiver’s email id
vsender VARCHAR2 (30) := ‘’; –sender’s email id
vsubj VARCHAR2 (50) := ‘subject’; –subject
vmesg VARCHAR2 (4000);
vmtype VARCHAR2 (30) := ‘text/plain; charset=us-ascii’;

vmesg := ‘Please print and complete attachment’; –message
UTL_FILE.fgetattr (‘CTEMP’, –name of the directory
‘o’ || :p_conc_request_id || ‘.out’, –name of the file

vinhandle :=
UTL_FILE.fopen (‘CTEMP’, ‘o’ || :p_conc_request_id || ‘.out’,’R’);
UTL_FILE.get_raw (vinhandle, rfile, flen);
UTL_FILE.fclose (vinhandle);
utl_mail.send_attach_raw (sender => vsender
,recipients => vrec
,subject => vsubj
,MESSAGE => vmesg
,attachment => rfile
,att_inline => FALSE
,att_filename => ‘o’|| :p_conc_request_id|| ‘.out’
— CTEMP is a directory with path as $APPLCSF/out or your custom out folder
return (TRUE);


In this options you write a PL/SQL procedure which will first submit the report first using FND_SUBMIT_REQUEST, get request_id, build the output location FND_CONCURRENT_REQUESTS- ‘OUT_FILE’ column , subimt the host concurrent program by passing parameters using FND_SUBMIT_REQUEST.

This approcah is very similar to step 1 above.

4.Options 4 : Oracle Alert

Third options is you can use the alerts functionality for your requirement.

You can either customize and use a predefined alert as your requirement is a generic one. or otherwise you can define your own alert requirement.

5.Options 5

Use Workflow Notification mail

You have to setup workflow notification mailer and then you have to configure the complete setup for your requirement

6.Options 6 Integrating with XML Publisher’s Delivery Manager

Another options would be Use of Java Delivery Manager APs (XDO).

What is the “Delivery Manager”

  • A set of JAVA APIs that allow you to control the delivery of your XML Publisher documents
  • Facilitates the delivery of documents through “Channels”
  • Printer Channel
  • Fax Channel
  • Email Channel
  • WebDAVChannel
  • Track the status of each delivery
  • Redeliver documents

What is needed to integrate with Delivery Manager?

  • Requires a developer with programming knowledge of JAVA and SQL
  • XML Publisher v5.6.2 or higher
  • BI Publisher v10.1.3.2

What are the steps to integrate with Delivery Manager?

  1. Step # 1 -Install and configure packages
  2. Step # 2 -Develop Java based classes against XML Publisher Delivery Manager API
  3. Step # 3 -Integrate Java classes with Oracle EBS
Related Posts

Posted in 11i, EBS Suite | 1 Comment »Email This Post Email This Post |

Have you tried OracleappsHub in ipad/iphone/smart Phone? Don't wait. try it today
One Response
  1. Ivan Says:

    Hello All,

    Is there a way to send different types of emails from different senders, within a same ORG_ID?

    Thanks in advance,

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.