How to get the value of a mail triggered is success or not

Hi Experts,

Following is the scenario that I have to implement in the script.

I will pass the details of individual IM's to the following function.

Based on a scheduler that I have scheduled it will trigger the mail in every 15 minutes.

The scenario is duplicate mails shouldn't get triggered. And the next day if the same IM satisfies the condition it should again get triggered one time that day and so on.

My plan is to use the variable which has a success or failed as value while triggering notification mail

So the scheduler runs for the first time in a day it will fetch all the IM(those are satisfying the criteria) and the mail will get triggered. And the value of the variable will become Success if any mail got triggered.

At the same time we will set the value of temp field in probsummary table to true(For IM's that mail got triggered).

During the next scheduler run it will fetch the IM's that has false as value in probsummary table. And mail will get triggered accordingly.

On the next day before the first run of the scheduler we have to change the value of the temp field in probsummary to false(Using sql trigger or anything else). So again it will start from the beginning.


// This function will help to configure the Notification Template that supposed to Trigger

function SendMail(incident) {

 var rteReturnValue = new SCDatum();

 var rteNames = new SCDatum();

 var rteValues = new SCDatum();

 var argNames = new SCDatum();

 var argVals = new SCDatum();

 var argVal=new SCDatum();

 //Parameter names for RAD app us.notify



 //Parameter values

 rteValues.push("IM Update_Assignee");


 system.functions.rtecall("callrad",  rteReturnValue, "us.notify", rteNames,  rteValues, false); //run in same thread

 return 1;



Anybody please help me to find out how I can get the failure or success value of a mail triggering to include in this script.

Thanks in Advance.


Sandhu Mol