Today we will see how to send email in Siebel using script.
We know that we can send email by pressing F9 button in siebel client. Now let us see how to send email using script.
We can send email with the native Siebel email client in the following ways:
- From the application-level menu, choose File > Send Email.
- Press F9.
- Click to the right of Initiate Work Item on the communications toolbar, then click Send Email, or click Initiate Work Item when the displayed ToolTip text is "Send Email."
Generally siebel vanilla uses Outbound Communication Manager to send email. This is nothing but a vanilla business service used to send email. We are going to use the same business service in script to send the email. We can add attachment also to the email we are sending using script.
Using the below script we can send email using Outbound Communication Manager.
var mailBS = TheApplication().GetService("Outbound Communications Manager");
var psInput = TheApplication().NewPropertySet();
var psOutput = TheApplication().NewPropertySet();
psInput.SetProperty("CommProfile", "Communication profile name");
psInput.SetProperty("MsgToList", "email ids to whom you want to send email");
psInput.SetProperty("MsgBody", "email content");
psInput.SetProperty("MsgSubject", "subject");
mailBS.InvokeMethod("SendMessage", psInput, psOutput);
Thanks! for reading the post. Hope this is helpful.