/**
  * send notification about new user accounts
  *
  * @access protected
  */
 protected static function _sendNotification(ilECSSetting $server, ilObjUser $user_obj)
 {
     if (!count($server->getUserRecipients())) {
         return true;
     }
     // If sub id is set => mail was send
     include_once './Services/WebServices/ECS/classes/class.ilECSImport.php';
     $import = new ilECSImport($server->getServerId(), $user_obj->getId());
     if ($import->getSubId()) {
         return false;
     }
     include_once './Services/Language/classes/class.ilLanguageFactory.php';
     $lang = ilLanguageFactory::_getLanguage();
     $lang->loadLanguageModule('ecs');
     include_once './Services/Mail/classes/class.ilMail.php';
     $mail = new ilMail(6);
     $mail->enableSoap(false);
     $subject = $lang->txt('ecs_new_user_subject');
     // build body
     $body = $lang->txt('ecs_new_user_body') . "\n\n";
     $body .= $lang->txt('ecs_new_user_profile') . "\n\n";
     $body .= $user_obj->getProfileAsString($lang) . "\n\n";
     $body .= ilMail::_getAutoGeneratedMessageString($lang);
     $mail->sendMail($server->getUserRecipientsAsString(), "", "", $subject, $body, array(), array("normal"));
     // Store sub_id = 1 in ecs import which means mail is send
     $import->setSubId(1);
     $import->save();
     return true;
 }