Built-in multiple-notification functionality fails at macro::execute when applied on a custom object, thus a different solution is required.
As it turns out, there is a notify_contact method defined as:
notify_contact(int, // notify_level (urgency: 1 - low, 2 - normal, etc.)
string, // msg_title
string, // msg_body
string, // msg_ack (unsure for the purpose of this field yet)
int, // transition_point (Activity Notification flag?)
string, // context_persid (persistent_id of context object.)
int, // is_internal (probably internal field flag)
int, // cmth_override (override contact notification method with specified method ID. 0 -- keeps default setting.)
... // arg[0] -- (string)in_msg_html -- sends HTML message.
SDM 14.1 only:
... // arg[1] -- likely (int)allow_internal_group -- upon testing, no affect noticed, so unsure about meaning.
... // arg[2] -- (int)is_email_to_list_flag -- mail method: // these values need more in-depth testing.
0 -- takes both 'to:' and 'cc:' addresses from specified list;
1 -- no effect;
2 -- sends to default contact e-mail, no cc: recipients.
... // arg[3] -- (string)email_to_list -- a list of recipient adderesses, semicolon separated.
... // arg[4] -- (string)email_cc_list -- a list of cc adderesses, semicolon separated.
... // arg[5] -- (int)attachment_id -- attaches the specified file to an email.
); // possibly there are more additional arguments, at this stage they were not needed and not tested.
Usage for SDM 12.9:
object cntobj;
send_wait(0, top_object(), "call_attr", "cnt", "dob_by_persid", 0, "cnt:2C74D1CF51FDB844ADCF79296B5F7367");
cntobj = msg[0];
// notify_contact( int, string, string, string, int, string, int, int, ...) ;
send_wait(0, cntobj, "notify_contact", 2, "test subject", "test body", "", 0, "ztest_wf:400006", 0, 0, "<b>test body</b>");
if (msg_error()) { logf(ERROR, "Error %s", msg[0]); }
SDM 14.1 introduced a couple of new atrributes to be passed: Recipient Email List, CC List and attachments:
send_wait(0, cntobj, "notify_contact", 2, "test subject", "test body", "", 0, "ztest_wf:400006", 0, 0, "<b>test body</b>", 0, 0, "to@email1;to@email2", "cc@email1;cc@email2", (int)attachment_id);