public function notify(MaestroNotification &$obj) { //now, we're offloading the notification to this class to do whatever it needs to do. $from = variable_get('site_mail', '*****@*****.**'); $send = TRUE; if (is_array($obj->getUserIDs())) { foreach ($obj->getUserIDs() as $userID) { $to = $obj->getUserEmailAddresses($userID); $params = array('message' => $obj->getMessage(), 'subject' => $obj->getSubject(), 'queueID' => $obj->getQueueId()); $result = drupal_mail('maestro', $obj->getNotificationType(), $to, language_default(), $params, $from, $send); } } }