• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilMail类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ilMail的典型用法代码示例。如果您正苦于以下问题:PHP ilMail类的具体用法?PHP ilMail怎么用?PHP ilMail使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ilMail类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: notify

 public function notify(ilNotificationObject $notification)
 {
     // use a specific sender or ANONYMOUS
     $sender_id = isset($notification->handlerParams['mail']['sender']) ? $notification->handlerParams['mail']['sender'] : ANONYMOUS_USER_ID;
     include_once 'Services/Mail/classes/class.ilMail.php';
     $mail = new ilMail($sender_id);
     $mail->appendInstallationSignature(true);
     $mail->sendMail($notification->user->getLogin(), '', '', $notification->title, $notification->longDescription, false, array('normal'));
     //mail($notification->user->getEmail(), $notification->title, $notification->longDescription);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilNotificationMailHandler.php


示例2: _checkGoto

 /**
  * check whether goto script will succeed
  */
 function _checkGoto($a_target)
 {
     global $rbacsystem;
     require_once 'Services/Mail/classes/class.ilMail.php';
     $mail = new ilMail($_SESSION["AccountId"]);
     if ($rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId())) {
         return true;
     }
     return false;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilObjMailAccess.php


示例3: getMails

 /**
  * Get Mails
  */
 function getMails()
 {
     global $ilUser;
     // BEGIN MAILS
     $umail = new ilMail($_SESSION["AccountId"]);
     $mbox = new ilMailBox($_SESSION["AccountId"]);
     $inbox = $mbox->getInboxFolder();
     //SHOW MAILS FOR EVERY USER
     $this->mails = $umail->getMailsOfFolder($inbox, array('status' => 'unread', 'type' => 'system'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:13,代码来源:class.ilPDSysMessageBlockGUI.php


示例4: sendAdvancedNotification

 /**
  * send an advanced notification to the owner of the test
  * @param int $owner_id
  * @param string $title
  * @param sting $usr_data
  * @param array $file_names
  */
 public function sendAdvancedNotification($owner_id, $title, $usr_data, $file_names)
 {
     $this->initLanguage($owner_id);
     $this->language->loadLanguageModule('assessment');
     $this->initMail();
     $this->setSubject(sprintf($this->language->txt('tst_user_finished_test'), $title));
     $this->setBody(ilMail::getSalutation($owner_id, $this->getLanguage()));
     $this->appendBody("\n\n");
     $this->appendBody($this->language->txt('user_has_finished_a_test'));
     $this->appendBody("\n\n");
     $this->appendBody($this->language->txt('title') . ': ' . $title);
     $this->appendBody("\n");
     $this->appendBody($this->language->txt('username') . ': ' . $usr_data);
     $this->appendBody("\n");
     ilDatePresentation::setUseRelativeDates(false);
     $this->appendBody($this->language->txt('tst_finished') . ': ' . ilDatePresentation::formatDate(new ilDateTime(time(), IL_CAL_UNIX)));
     $this->appendBody("\n\n");
     $this->appendBody($this->language->txt('tst_attached_xls_file'));
     $this->appendBody("\n\n");
     $this->appendBody($this->language->txt('tst_notification_explanation_admin'));
     $this->appendBody("\n");
     $this->setAttachments($file_names);
     $this->getMail()->appendInstallationSignature(true);
     $this->sendMail(array($owner_id), array('system'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilTestMailNotification.php


示例5: send

 /**
  * Send notifications
  * @return 
  */
 public function send()
 {
     global $ilUser;
     switch ($this->getType()) {
         case self::TYPE_USER_BLOCKED:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('cont_user_blocked'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('cont_user_blocked2'));
                 $this->appendBody("\n");
                 $this->appendBody($this->getLanguageText('cont_user_blocked3') . " '" . $this->getLanguageText('objs_qst') . "' > '" . $this->getLanguageText('cont_blocked_users') . "'");
                 $this->appendBody("\n");
                 $this->appendBody($this->getLanguageText('obj_lm') . ": " . $this->getObjectTitle(true));
                 $this->appendBody("\n");
                 include_once "./Services/User/classes/class.ilUserUtil.php";
                 $this->appendBody($this->getLanguageText('user') . ": " . ilUserUtil::getNamePresentation($ilUser->getId(), false, false, ""));
                 $this->appendBody("\n");
                 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
                 $this->appendBody($this->getLanguageText('question') . ": " . assQuestion::_getTitle($this->getQuestionId()));
                 $this->appendBody("\n");
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('cont_lm_mail_permanent_link'));
                 $this->appendBody("\n");
                 $this->appendBody($this->createPermanentLink(array(), ""));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
     }
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:38,代码来源:class.ilLMMailNotification.php


示例6: buildBody

 private function buildBody()
 {
     //	Salutation
     $this->setBody(ilMail::getSalutation($this->getRecipient(), $this->getLanguage()));
     $this->appendBody("\n\n");
     //	Message (What has happened?)
     $this->appendBody($this->getLanguageText('tst_notify_manscoring_done_body_msg_topic'));
     $this->appendBody("\n\n");
     $info = $this->getAdditionalInformation();
     $this->appendBody($this->getLanguageText('obj_tst') . ': ' . $info['test_title']);
     $this->appendBody("\n");
     $this->appendBody($this->getLanguageText('pass') . ': ' . $info['test_pass']);
     $this->appendBody("\n\n");
     foreach ($info['questions_gui_list'] as $questionId => $questionGui) {
         $points = $info['questions_scoring_data'][$questionId]['points'];
         $feedback = $info['questions_scoring_data'][$questionId]['feedback'];
         $feedback = $this->convertFeedbackForMail($feedback);
         $this->appendBody($this->getLanguageText('tst_question') . ': ' . $questionGui->object->getTitle());
         $this->appendBody("\n");
         $this->appendBody($this->getLanguageText('tst_reached_points') . ': ' . $points);
         $this->appendBody("\n");
         $this->appendBody($this->getLanguageText('set_manual_feedback') . ":\n" . $feedback);
         $this->appendBody("\n\n");
     }
     //	Task (What do I have to do?
     /* NOTHING TODO FOR PARTICIPANT */
     //	Explanation (Why do I receive the following message?)
     $this->appendBody("\n");
     $this->appendBody($this->getLanguageText('tst_notify_manscoring_done_body_msg_reason'));
     //	Signature
     $this->getMail()->appendInstallationSignature(true);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:32,代码来源:class.ilTestManScoringParticipantNotification.php


示例7: send

 public function send()
 {
     switch ($this->getType()) {
         case self::TYPE_NOTIFICATION_ACTIVATION:
             $additional_information = $this->getAdditionalInformation();
             /**
              * @var $user ilObjUser
              */
             $user = $additional_information['usr'];
             foreach ($this->getRecipients() as $rcp) {
                 try {
                     $this->handleCurrentRecipient($rcp);
                 } catch (ilMailException $e) {
                     continue;
                 }
                 $this->initMimeMail();
                 $this->setSubject($this->getLanguage()->txt('reg_mail_subject_confirmation'));
                 $this->setBody($this->getLanguage()->txt('reg_mail_body_salutation') . ' ' . $user->getFullname() . ',');
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguage()->txt('reg_mail_body_confirmation'));
                 $this->appendBody("\n");
                 $this->appendBody(ILIAS_HTTP_PATH . '/confirmReg.php?client_id=' . CLIENT_ID . '&rh=' . ilObjUser::_generateRegistrationHash($user->getId()));
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguage()->txt('reg_mail_body_2_confirmation'), ilFormat::_secondsToString($additional_information['hash_lifetime'])));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguage()->txt('reg_mail_body_3_confirmation'));
                 $this->appendBody(ilMail::_getInstallationSignature());
                 $this->sendMimeMail($this->getCurrentRecipient());
             }
             break;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:32,代码来源:class.ilRegistrationMimeMailNotification.php


示例8: send

 public function send()
 {
     global $lng;
     $additional_information = $this->getAdditionalInformation();
     $old_val = ilDatePresentation::useRelativeDates();
     ilDatePresentation::setUseRelativeDates(false);
     foreach ($this->getRecipients() as $rcp) {
         try {
             $this->handleCurrentRecipient($rcp);
         } catch (ilMailException $e) {
             continue;
         }
         $this->initMimeMail();
         $this->initLanguageByIso2Code();
         ilDatePresentation::setLanguage($this->getLanguage());
         $date_for_deletion = ilDatePresentation::formatDate(new ilDate($additional_information["date"], IL_CAL_UNIX));
         $this->setSubject($this->getLanguage()->txt('del_mail_subject'));
         $body = sprintf($this->getLanguage()->txt("del_mail_body"), $rcp->fullname, "\n\n", $additional_information["www"], $date_for_deletion);
         $this->appendBody($body);
         $this->appendBody(ilMail::_getInstallationSignature());
         $this->sendMimeMail($this->getCurrentRecipient());
     }
     ilDatePresentation::setUseRelativeDates($old_val);
     ilDatePresentation::setLanguage($lng);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilCronDeleteInactiveUserReminderMailNotification.php


示例9: _sendNotificationToVATAdministration

 /**
  * Sends a notification message to all users responsible for vat assignment.
  * 
  * @access	public
  * @static
  * @param	ilPaymentObject $oPaymentObject
  */
 public static function _sendNotificationToVATAdministration($oPaymentObject)
 {
     global $ilSetting, $lng, $ilClientIniFile;
     $payment_vat_admins = $ilSetting->get('payment_vat_admins');
     $users = explode(',', $payment_vat_admins);
     $subject = $lng->txt('payment_vat_assignment_notification_subject');
     $tmp_obj = ilObjectFactory::getInstanceByRefId($oPaymentObject->getRefId());
     $message = sprintf($lng->txt('payment_vat_assignment_notification_body'), $tmp_obj->getTitle()) . "\n\n";
     $message .= "------------------------------------------------------------\n";
     $message .= sprintf($lng->txt('payment_vat_assignment_notification_intro'), $ilClientIniFile->readVariable('client', 'name'), ILIAS_HTTP_PATH . '/?client_id=' . CLIENT_ID);
     include_once 'Services/Mail/classes/class.ilMail.php';
     $mail_obj = new ilMail(ANONYMOUS_USER_ID);
     foreach ((array) $users as $login) {
         if (strlen(trim($login)) && (int) ilObjUser::_lookupId(trim($login))) {
             $success = $mail_obj->sendMail(trim($login), '', '', $subject, $message, array(), array("system"));
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:25,代码来源:class.ilShopUtils.php


示例10: __construct

 public function __construct($wsp_access_handler = null, $wsp_node_id = null)
 {
     global $tpl, $ilCtrl, $lng, $ilUser, $rbacsystem;
     $this->tpl = $tpl;
     $this->ctrl = $ilCtrl;
     $this->lng = $lng;
     // personal workspace
     $this->wsp_access_handler = $wsp_access_handler;
     $this->wsp_node_id = $wsp_node_id;
     $this->ctrl->saveParameter($this, "mobj_id");
     $this->ctrl->saveParameter($this, "ref");
     // check if current user may send mails
     include_once "Services/Mail/classes/class.ilMail.php";
     $mail = new ilMail($_SESSION["AccountId"]);
     $this->mailing_allowed = $rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId());
     $this->umail = new ilFormatMail($ilUser->getId());
     $this->abook = new ilAddressbook($ilUser->getId());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:18,代码来源:class.ilMailSearchGroupsGUI.php


示例11: send

    /**
     * 
     * Send notifications	 
     *  
     * @access	public
     *  
     */
    public function send()
    {
        global $ilDB;
        // parent::send();
        if (count($this->getRecipients())) {
            $res = $ilDB->queryf("SELECT u.usr_id,u.gender,u.firstname,u.lastname,u.login,u.email,u.last_login,u.active," . "u.time_limit_unlimited, " . $ilDB->fromUnixtime("u.time_limit_from") . ", " . $ilDB->fromUnixtime("u.time_limit_until") . "," . "CASE WHEN u.active = 0 THEN '0001-01-01' ELSE CASE WHEN u.time_limit_unlimited=1 THEN '9999-12-31' ELSE " . $ilDB->fromUnixtime("u.time_limit_until") . " END END access_until," . " CASE WHEN " . $ilDB->unixTimestamp() . " BETWEEN u.time_limit_from AND u.time_limit_until THEN 0 ELSE 1 END expired," . "rq.role_disk_quota, system_role.rol_id role_id, " . "p1.value+0 user_disk_quota," . "p2.value+0 disk_usage, " . "p3.value last_update, " . "p5.value language, " . "CASE WHEN rq.role_disk_quota>p1.value+0 OR p1.value IS NULL THEN rq.role_disk_quota ELSE p1.value+0 END disk_quota\t" . "FROM usr_data u  " . "JOIN (SELECT u.usr_id usr_id,MAX(rd.disk_quota) role_disk_quota " . "FROM usr_data u " . "JOIN rbac_ua ua ON ua.usr_id=u.usr_id " . "JOIN rbac_fa fa ON fa.rol_id=ua.rol_id AND fa.parent=%s  " . "JOIN role_data rd ON rd.role_id=ua.rol_id WHERE u.usr_id=ua.usr_id GROUP BY u.usr_id) rq ON rq.usr_id=u.usr_id " . "LEFT JOIN rbac_ua system_role ON system_role.usr_id=u.usr_id AND system_role.rol_id = %s " . "LEFT JOIN usr_pref p1 ON p1.usr_id=u.usr_id AND p1.keyword = 'disk_quota'  " . "LEFT JOIN usr_pref p2 ON p2.usr_id=u.usr_id AND p2.keyword = 'disk_usage'  " . "LEFT JOIN usr_pref p3 ON p3.usr_id=u.usr_id AND p3.keyword = 'disk_usage.last_update'  " . "LEFT JOIN usr_pref p5 ON p5.usr_id=u.usr_id AND p5.keyword = 'language'  " . 'WHERE (((p1.value+0 > rq.role_disk_quota OR rq.role_disk_quota IS NULL) AND p2.value+0 > p1.value+0) OR 
					((rq.role_disk_quota > p1.value+0 OR p1.value IS NULL) AND p2.value+0 > rq.role_disk_quota)) ' . 'AND (u.active=1 AND (u.time_limit_unlimited = 1 OR ' . $ilDB->unixTimestamp() . ' BETWEEN u.time_limit_from AND u.time_limit_until)) ', array('integer', 'integer'), array(ROLE_FOLDER_ID, SYSTEM_ROLE_ID));
            $users = array();
            $counter = 0;
            while ($row = $ilDB->fetchAssoc($res)) {
                $details = ilDiskQuotaChecker::_lookupDiskUsage($row['usr_id']);
                $users[$counter]['disk_quota'] = $row['disk_quota'];
                $users[$counter]['disk_usage'] = $details['disk_usage'];
                $users[$counter]['email'] = $row['email'];
                $users[$counter]['firstname'] = $row['firstname'];
                $users[$counter]['lastname'] = $row['lastname'];
                ++$counter;
            }
            if (count($users)) {
                foreach ($this->getRecipients() as $rcp) {
                    $usrId = ilObjUser::_lookupId($rcp);
                    $this->initLanguage($usrId);
                    $this->initMail();
                    $this->setSubject($this->getLanguage()->txt('disk_quota_summary_subject'));
                    $this->setBody(ilMail::getSalutation($usrId, $this->getLanguage()));
                    $this->appendBody("\n\n");
                    $this->appendBody($this->getLanguage()->txt('disk_quota_exceeded_headline'));
                    $this->appendBody("\n\n");
                    $first = true;
                    $counter = 0;
                    $numUsers = count($users);
                    foreach ($users as $user) {
                        if (!$first) {
                            $this->appendBody("\n---------------------------------------------------\n\n");
                        }
                        $this->appendBody($this->getLanguage()->txt('fullname') . ': ' . $user['lastname'] . ', ' . $user['firstname'] . "\n");
                        $this->appendBody($this->getLanguage()->txt('email') . ': ' . $user['email'] . "\n");
                        $this->appendBody($this->getLanguage()->txt('disk_quota') . ': ' . ilFormat::formatSize($user['disk_quota'], 'short', $this->getLanguage()) . "\n");
                        $this->appendBody($this->getLanguage()->txt('currently_used_disk_space') . ': ' . ilFormat::formatSize($user['disk_usage'], 'short', $this->getLanguage()) . "\n");
                        $this->appendBody($this->getLanguage()->txt('usrf_profile_link') . ': ' . ilUtil::_getHttpPath() . '/goto.php?target=usrf&client_id=' . CLIENT_ID);
                        if ($counter < $numUsers - 1) {
                            $this->appendBody("\n");
                        }
                        ++$counter;
                        $first = false;
                    }
                    $this->getMail()->appendInstallationSignature(true);
                    $this->sendMail(array($rcp), array('system'), false);
                }
            }
        }
    }
开发者ID:arlendotcn,项目名称:ilias,代码行数:59,代码来源:class.ilDiskQuotaSummaryNotification.php


示例12: send

 /**
  * Parse and send mail
  * @return 
  */
 public function send()
 {
     switch ($this->getType()) {
         case self::TYPE_NOTIFICATION_APPROVERS:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject($this->getLanguageText('reg_mail_new_user'));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_new_user_body'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_profile'));
                 $info = $this->getAdditionalInformation();
                 $this->appendBody("\n\n");
                 $this->appendBody($info['usr']->getProfileAsString($this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_reason'));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->getMail()->enableSoap(false);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_NOTIFICATION_CONFIRMATION:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject($this->getLanguageText('reg_mail_new_user_confirmation'));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_new_user_body'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_profile'));
                 $info = $this->getAdditionalInformation();
                 $this->appendBody("\n\n");
                 $this->appendBody($info['usr']->getProfileAsString($this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_confirmation'));
                 $this->appendBody("\n");
                 // #4527
                 include_once "Services/Link/classes/class.ilLink.php";
                 $this->appendBody(ilLink::_getStaticLink($info['usr']->getId(), "usrf"));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_reason'));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->getMail()->enableSoap(false);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.ilRegistrationMailNotification.php


示例13: send

 /**
  * Send notifications
  * @return 
  */
 public function send()
 {
     global $ilUser;
     // parent::send();
     include_once "./Modules/Exercise/classes/class.ilExAssignment.php";
     switch ($this->getType()) {
         case self::TYPE_FEEDBACK_FILE_ADDED:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('exc_msg_new_feedback_file_uploaded'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('exc_msg_new_feedback_file_uploaded2'));
                 $this->appendBody("\n");
                 $this->appendBody($this->getLanguageText('obj_exc') . ": " . $this->getObjectTitle(true));
                 $this->appendBody("\n");
                 $this->appendBody($this->getLanguageText('exc_assignment') . ": " . ilExAssignment::lookupTitle($this->getAssignmentId()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('exc_mail_permanent_link'));
                 $this->appendBody("\n");
                 $this->appendBody($this->createPermanentLink(array(), '_' . $this->getAssignmentId()) . '#fb' . $this->getAssignmentId());
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_SUBMISSION_UPLOAD:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('exc_submission_notification_subject'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguageText('exc_submission_notification_body'), $this->getObjectTitle(true)));
                 $this->appendBody("\n");
                 $this->appendBody($this->getLanguageText('exc_assignment') . ": " . ilExAssignment::lookupTitle($this->getAssignmentId()));
                 $this->appendBody("\n");
                 $this->appendBody($this->getLanguageText('user') . ": " . $ilUser->getFullName());
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguageText('exc_submission_notification_link'), $this->createPermanentLink()));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
     }
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:51,代码来源:class.ilExerciseMailNotification.php


示例14: send

 public function send()
 {
     $additional_information = $this->getAdditionalInformation();
     foreach ($this->getRecipients() as $rcp) {
         try {
             $this->handleCurrentRecipient($rcp);
         } catch (ilMailException $e) {
             continue;
         }
         $this->initMimeMail();
         $this->initLanguageByIso2Code();
         $this->setSubject($this->getLanguage()->txt('del_mail_subject'));
         $body = sprintf($this->getLanguage()->txt("del_mail_body"), $rcp->fullname, "\n\n", $additional_information["www"], $additional_information["days"]);
         $this->appendBody($body);
         $this->appendBody(ilMail::_getInstallationSignature());
         $this->sendMimeMail($this->getCurrentRecipient());
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:18,代码来源:class.ilCronDeleteInactiveUserReminderMailNotification.php


示例15: send

 public function send()
 {
     include_once './Services/Link/classes/class.ilLink.php';
     $obj = new ilObjectFactory();
     $instance = $obj->getInstanceByRefId($_GET['ref_id']);
     $link = ilLink::_getLink($_GET['ref_id'], $instance->getType(), array(), '');
     global $lng;
     foreach ($this->getRecipients() as $rcp) {
         $this->initLanguage($rcp);
         $this->initMail();
         $this->setSubject(sprintf($lng->txt('rubric_exercise_graded') . ' ' . ilObject::_lookupTitle($this->getObjId()) . ' ' . $lng->txt('rubric_is_now_available'), $this->getObjectTitle(true)));
         $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
         $this->appendBody("\n\n");
         $this->appendBody($lng->txt('rubric_exercise_graded') . ' ' . ilObject::_lookupTitle($this->getObjId()) . ' ' . $lng->txt('rubric_is_now_available'));
         $this->appendBody("\n");
         $this->appendBody($this->getLanguageText('obj_exc') . ": " . $this->getObjectTitle(true));
         $this->appendBody("\n");
         $this->appendBody("\n\n");
         $this->appendBody($link);
         $this->getMail()->appendInstallationSignature(true);
         $this->sendMail(array($rcp), array('system'));
     }
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:23,代码来源:class.ilRubricGradeNotification.php


示例16: send

 public function send()
 {
     global $lng;
     $customer_array = $this->_getObjectsToRemind();
     foreach ($customer_array as $user_id => $objects_array) {
         $this->initLanguage($user_id);
         $user_lang = $this->getLanguage() ? $this->getLanguage() : $lng;
         $this->initMail();
         $this->setRecipients($user_id);
         $this->setSubject($this->getLanguageText('payment_reminder_notification_subject'));
         $this->setBody(ilMail::getSalutation($user_id, $this->getLanguage()));
         $this->appendBody("\n\n");
         $this->appendBody($user_lang->txt('bought_objects_expire_soon'));
         $this->appendBody("\n\n");
         foreach ($objects_array as $key => $pobject) {
             $this->appendBody("----------------------------------------------------------------------------------------------");
             $this->appendBody("\n\n");
             $this->appendBody($user_lang->txt('title') . ": " . $objects_array[$key]['object_title'] . "\n");
             $this->appendBody($user_lang->txt('access_enddate') . ": " . $objects_array[$key]['access_enddate']);
             $this->appendBody("\n");
             $this->appendBody("\n\n");
         }
         $this->appendBody("----------------------------------------------------------------------------------------------");
         //@todo fix this: $mailbox_link
         $this->appendBody($mailbox_link);
         $this->appendBody("\n\n");
         $this->appendBody(ilMail::_getAutoGeneratedMessageString($this->getLanguage()));
         $this->appendBody(ilMail::_getInstallationSignature());
         $mmail = new ilMimeMail();
         $mmail->autoCheck(false);
         $mmail->From('noreply');
         $mmail->To(ilObjUser::_lookupEmail($user_id));
         $mmail->Subject($this->getSubject());
         $mmail->Body($this->getBody());
         $mmail->Send();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:37,代码来源:class.ilPaymentNotification.php


示例17: send

 /**
  * Send notifications
  * @return 
  */
 public function send()
 {
     global $ilSetting;
     if ((int) $this->getRefId() && in_array($this->getType(), array(self::TYPE_ADMISSION_MEMBER))) {
         $obj = ilObjectFactory::getInstanceByRefId((int) $this->getRefId());
         if ($obj->getAutoNotification() == false) {
             return false;
         }
     }
     // #11359
     // parent::send();
     switch ($this->getType()) {
         case self::TYPE_ADMISSION_MEMBER:
             // automatic mails about status change disabled
             if (!$ilSetting->get('mail_crs_member_notification', true)) {
                 return;
             }
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('crs_added_member'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguageText('crs_added_member_body'), $this->getObjectTitle()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('crs_mail_permanent_link'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->createPermanentLink());
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('crs_accept_subscriber'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguageText('crs_accept_subscriber_body'), $this->getObjectTitle()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('crs_mail_permanent_link'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->createPermanentLink());
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('crs_reject_subscriber'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguageText('crs_reject_subscriber_body'), $this->getObjectTitle()));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_STATUS_CHANGED:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('crs_status_changed'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguageText('crs_status_changed_body'), $this->getObjectTitle()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->createCourseStatus($rcp));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('crs_mail_permanent_link'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->createPermanentLink());
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_DISMISS_MEMBER:
             // automatic mails about status change disabled
             if (!$ilSetting->get('mail_crs_member_notification', true)) {
                 return;
             }
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('crs_dismiss_member'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguageText('crs_dismiss_member_body'), $this->getObjectTitle()));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_BLOCKED_MEMBER:
             foreach ($this->getRecipients() as $rcp) {
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilCourseMembershipMailNotification.php


示例18: getRoleMailboxAddress

 /**
  * Returns the mailbox address of a role.
  *
  * Example 1: Mailbox address for an ILIAS reserved role name
  * ----------------------------------------------------------
  * The il_crs_member_345 role of the course object "English Course 1" is 
  * returned as one of the following mailbox addresses:
  *
  * a)   Course Member <#member@[English Course 1]>
  * b)   Course Member <#il_crs_member_345@[English Course 1]>
  * c)   Course Member <#il_crs_member_345>
  *
  * Address a) is returned, if the title of the object is unique, and
  * if there is only one local role with the substring "member" defined for
  * the object.
  *
  * Address b) is returned, if the title of the object is unique, but 
  * there is more than one local role with the substring "member" in its title.
  *
  * Address c) is returned, if the title of the course object is not unique.
  *
  *
  * Example 2: Mailbox address for a manually defined role name
  * -----------------------------------------------------------
  * The "Admin" role of the category object "Courses" is 
  * returned as one of the following mailbox addresses:
  *
  * a)   Course Administrator <#Admin@Courses>
  * b)   Course Administrator <#Admin>
  * c)   Course Adminstrator <#il_role_34211>
  *
  * Address a) is returned, if the title of the object is unique, and
  * if there is only one local role with the substring "Admin" defined for
  * the course object.
  *
  * Address b) is returned, if the title of the object is not unique, but 
  * the role title is unique.
  *
  * Address c) is returned, if neither the role title nor the title of the
  * course object is unique. 
  *
  *
  * Example 3: Mailbox address for a manually defined role title that can
  *            contains special characters in the local-part of a 
  *            mailbox address
  * --------------------------------------------------------------------
  * The "Author Courses" role of the category object "Courses" is 
  * returned as one of the following mailbox addresses:
  *
  * a)   "#Author Courses"@Courses
  * b)   Author Courses <#il_role_34234>
  *
  * Address a) is returned, if the title of the role is unique.
  *
  * Address b) is returned, if neither the role title nor the title of the
  * course object is unique, or if the role title contains a quote or a
  * backslash.
  *
  *
  * @param int a role id
  * @param boolean is_localize whether mailbox addresses should be localized
  * @return	String mailbox address or null, if role does not exist.
  * @todo refactor rolf
  */
 function getRoleMailboxAddress($a_role_id, $is_localize = true)
 {
     global $log, $lng, $ilDB;
     include_once "Services/Mail/classes/class.ilMail.php";
     if (ilMail::_usePearMail()) {
         // Retrieve the role title and the object title.
         $query = "SELECT rdat.title role_title,odat.title object_title, " . " oref.ref_id object_ref " . "FROM object_data rdat " . "JOIN rbac_fa fa ON fa.rol_id = rdat.obj_id " . "JOIN tree rtree ON rtree.child = fa.parent " . "JOIN object_reference oref ON oref.ref_id = rtree.parent " . "JOIN object_data odat ON odat.obj_id = oref.obj_id " . "WHERE rdat.obj_id = " . $this->ilDB->quote($a_role_id, 'integer') . " " . "AND fa.assign = 'y' ";
         $r = $ilDB->query($query);
         if (!($row = $ilDB->fetchObject($r))) {
             //$log->write('class.ilRbacReview->getMailboxAddress('.$a_role_id.'): error role does not exist');
             return null;
             // role does not exist
         }
         $object_title = $row->object_title;
         $object_ref = $row->object_ref;
         $role_title = $row->role_title;
         // In a perfect world, we could use the object_title in the
         // domain part of the mailbox address, and the role title
         // with prefix '#' in the local part of the mailbox address.
         $domain = $object_title;
         $local_part = $role_title;
         // Determine if the object title is unique
         $q = "SELECT COUNT(DISTINCT dat.obj_id) count " . "FROM object_data dat " . "JOIN object_reference ref ON ref.obj_id = dat.obj_id " . "JOIN tree ON tree.child = ref.ref_id " . "WHERE title = " . $this->ilDB->quote($object_title, 'text') . " " . "AND tree.tree = 1 ";
         $r = $this->ilDB->query($q);
         $row = $r->fetchRow(DB_FETCHMODE_OBJECT);
         // If the object tit 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilNonEditableValueGUI类代码示例发布时间:2022-05-23
下一篇:
PHP ilLink类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap