cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a mail from Application Log

rubanprasanth_s
Participant
0 Kudos
966

Hello CPS Experts,
We have a scenario where we are running a program ans as a result we are getting the application log in CPS.Now we have to send that Application Log file as a mail attachment.

Any idea on how to trigger the mail with the application Log file .

Regards,
Ruban.S

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ruban,

You can also use mail job definition type for this. Use this inside the Job definition.

[Attachments]

[ #Attach stderr from job 1, step 1

error.txt=Step 1, Job 1:stderr

#Attach all files from Step2, Job 1

@{name}-@{index}.txt=Step 1, Job 1:*

#Attach all log files from Step 2, Job 2

@{name}-@{index}.txt=Step 2, Job 2:?type=log

Regards, Manisha

0 Kudos

now the big question is how can you do that in a chain to identify the job that failed and to send the log using the Send_ Mail job Definition.

Former Member
0 Kudos

I use raise events as follows:

1. Create an event definition

2. Create an email process definition

3. In the step of the chain raise this event on the status of - completed / killed - the Raise Comment is

    "Event raised by process ${jobid} ${jobdescription} being set to status ${jobstatus}

4. These values are passed to the email jobprocess as pJobid, pJobdescription

     you can then format it as above

gmblom
Active Contributor
0 Kudos

Hello,

The System_Mail_Send job has a field where you can specify the file to send.

Regards Gerben