Hi all,
I am trying to send mail to multiple user using message_send function. And using below code.
This code is used to send mail to single user but I want to customize it to send mail to multiple users (for e.g on submitting assignment).
Code is as follows:
$eventdata = new stdClass();
$eventdata->modulename = 'assign';
$eventdata->userfrom = $userfrom;
$eventdata->userto = $userto;
$eventdata->subject = $postsubject;
$eventdata->fullmessage = $posttext;
$eventdata->fullmessageformat = FORMAT_PLAIN;
$eventdata->fullmessagehtml = $posthtml;
$eventdata->smallmessage = $postsubject;
$eventdata->name = $eventtype;
$eventdata->component = 'mod_assign';
$eventdata->notification = 1;
$eventdata->contexturl = $info->url;
$eventdata->contexturlname = $info->assignment;
message_send($eventdata);//need to customize this
Does anybody knows how to achieve this?
Any help is appreciated.
Thanks,
Komal.