EPM Automate sendMail

I recently wrote about using PowerShell to archive snapshots.  One of the reasons I wanted to start using PowerShell instead of batch scripts was because PowerShell has the ability to send emails.  As I was about to dig into how to write that code, a wonderful thing happened.  Oracle released a new EPM Automate command to send email.  This just made life a whole lot easier.

The EPM Automate command sendMail is straightforward and easy to understand.  Per Oracle documentation:

epmautomate sendMail ToAddresse Subject [Body=”MessageBody”] [Attachments=FILE1,FILE2] where:

  • ToAddresse identify semicolon separated email addresses of recipients. Example, jdoe@example.com;jane.doe@example.com
  • Subject identifies the email subject.
  • Body=”MessageBody”, optionally, is the email content. If not specified, there is no body to the email.
  • Attacments, optionally, identifies a comma separated list of files available in EPM Cloud to be attached to the email. For example, outbox/errorFile.txt,inbox/users.csv or outbox/use*.txt. In this example, the wildcard is applied only to one character in the string. Using outbox/use*.txt allows you to attach all files in the outbox with four letter file names that fit the pattern.

Using the PowerShell script we created for archiving snapshots, I added a line at the end to send an email.

Here’s the email that is received.

This is a very basic example.  We can get more creative and send different emails depending on success or failure of the different steps in the script.  But the beauty of using this EPM Automate command is that it’s so simple.  There’s no need-to-know SMTP information and credentials, just enter one or more email addresses, a subject, and a message.  You can also include attachments from the EPM Cloud inbox/outbox.   One last note, this is a brand-new feature in EPM Automate that was introduced in the 20.04 cloud update.  Be sure to download and install the latest version of EPM Automate to take advantage of new features each month.

As always, happy EPM’ng!

9 thoughts on “EPM Automate sendMail

  1. At this time, only files from the EPM Cloud inbox/outbox can be attached. You could include in the script commands to upload local files to the inbox and then you would be able to attach the file to the email.


      1. Yeah. I guess files in the Inbox/Outbox in Overview show up without a folder prefix:


        Where the same file in the ‘outbox’ in Data Managment show up as:


        And a bunch of other system files etc. So what I did was just upload the log files to the directory:


        Then I attach to email from there. For life of me could not figure out how to attach from the Inbox/Outbox in Overview 😦


  2. I have uploaded a file to the inbox/outbox in Overview. For the life of me, I can’t figure out how to attach it to the sendMail. I have tried all kinds of paths. What is the path to that location? I thought it was /u03/lcm/. That is where data exports reside. Is this even possible from that location?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s