当前位置: 首页>>代码示例>>PHP>>正文


PHP ilMail::sendMimeMail方法代码示例

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


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

示例1: deleteOwnAccount4

 /**
  * Delete own account dialog - action incl. notification email
  */
 protected function deleteOwnAccount4()
 {
     global $ilUser, $ilAuth, $ilSetting, $ilLog;
     if (!(bool) $ilSetting->get('user_delete_own_account') || $ilUser->getId() == SYSTEM_USER_ID || !$ilUser->hasDeletionFlag()) {
         $this->ctrl->redirect($this, "showGeneralSettings");
     }
     // build notification
     include_once "./Services/Notification/classes/class.ilSystemNotification.php";
     $ntf = new ilSystemNotification();
     $ntf->setLangModules(array("user"));
     $ntf->addAdditionalInfo("profile", $ilUser->getProfileAsString($this->lng), true);
     // mail message
     ilDatePresentation::setUseRelativeDates(false);
     $ntf->setIntroductionDirect(sprintf($this->lng->txt("user_delete_own_account_email_body"), $ilUser->getLogin(), ILIAS_HTTP_PATH, ilDatePresentation::formatDate(new ilDateTime(time(), IL_CAL_UNIX))));
     $message = $ntf->composeAndGetMessage($ilUser->getId(), null, null, true);
     $subject = $this->lng->txt("user_delete_own_account_email_subject");
     // send notification
     include_once "Services/Mail/classes/class.ilMail.php";
     $mail = new ilMail(ANONYMOUS_USER_ID);
     $user_email = $ilUser->getEmail();
     $admin_mail = $ilSetting->get("user_delete_own_account_email");
     // to user, admin as bcc
     if ($user_email) {
         $mail->sendMimeMail($user_email, null, $admin_mail, $subject, $message, null, true);
     } else {
         if ($admin_mail) {
             $mail->sendMimeMail($admin_mail, null, null, $subject, $message, null, true);
         }
     }
     $ilLog->write("Account deleted: " . $ilUser->getLogin() . " (" . $ilUser->getId() . ")");
     $ilUser->delete();
     // terminate session
     $ilAuth->logout();
     session_destroy();
     ilUtil::redirect("login.php?accdel=1");
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:39,代码来源:class.ilPersonalSettingsGUI.php

示例2: sendUserResultsMail

 public function sendUserResultsMail($a_active_id, $a_recipient)
 {
     global $ilUser;
     $finished = $this->object->getSurveyParticipants(array($a_active_id));
     $finished = array_pop($finished);
     $finished = ilDatePresentation::formatDate(new ilDateTime($finished["finished_tstamp"], IL_CAL_UNIX));
     require_once "Services/Mail/classes/class.ilMail.php";
     require_once "Services/Link/classes/class.ilLink.php";
     $body = ilMail::getSalutation($ilUser->getId()) . "\n\n";
     $body .= $this->lng->txt("svy_mail_own_results_body") . "\n";
     $body .= "\n" . $this->lng->txt("obj_svy") . ": " . $this->object->getTitle() . "\n";
     $body .= ilLink::_getLink($this->object->getRefId(), "svy") . "\n";
     $body .= "\n" . $this->lng->txt("survey_results_finished") . ": " . $finished . "\n\n";
     $body .= $this->getUserResultsPlain($a_active_id);
     // $body .= ilMail::_getAutoGeneratedMessageString($this->lng);
     $body .= ilMail::_getInstallationSignature();
     require_once "Services/Mail/classes/class.ilMail.php";
     $mail = new ilMail(ANONYMOUS_USER_ID);
     $mail->sendMimeMail($a_recipient, null, null, sprintf($this->lng->txt("svy_mail_own_results_subject"), $this->object->getTitle()), $body, null, true);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:20,代码来源:class.ilObjSurveyGUI.php

示例3: deleteOwnAccount4

 /**
  * Delete own account dialog - action incl. notification email
  */
 protected function deleteOwnAccount4()
 {
     global $ilUser, $ilAuth, $ilSetting, $ilLog;
     if (!(bool) $ilSetting->get('user_delete_own_account') || $ilUser->getId() == SYSTEM_USER_ID || !$ilUser->hasDeletionFlag()) {
         $this->ctrl->redirect($this, "showGeneralSettings");
     }
     include_once "Services/Mail/classes/class.ilMail.php";
     $mail = new ilMail(ANONYMOUS_USER_ID);
     // send mail(s)
     $subject = $this->lng->txt("user_delete_own_account_email_subject");
     $message = $this->lng->txt("user_delete_own_account_email_body");
     // salutation/info
     ilDatePresentation::setUseRelativeDates(false);
     $message = ilMail::getSalutation($ilUser->getId()) . "\n\n" . sprintf($message, $ilUser->getLogin(), ILIAS_HTTP_PATH, ilDatePresentation::formatDate(new ilDateTime(time(), IL_CAL_UNIX)));
     // add profile data (see ilAccountRegistrationGUI)
     $message .= "\n\n" . $ilUser->getProfileAsString($this->lng);
     // signatur
     $message .= ilMail::_getInstallationSignature();
     $user_email = $ilUser->getEmail();
     $admin_mail = $ilSetting->get("user_delete_own_account_email");
     // to user, admin as bcc
     if ($user_email) {
         $mail->sendMimeMail($user_email, null, $admin_mail, $subject, $message, null, true);
     } else {
         if ($admin_mail) {
             $mail->sendMimeMail($admin_mail, null, null, $subject, $message, null, true);
         }
     }
     $ilLog->write("Account deleted: " . $ilUser->getLogin() . " (" . $ilUser->getId() . ")");
     $ilUser->delete();
     // terminate session
     $ilAuth->logout();
     session_destroy();
     ilUtil::redirect("login.php?accdel=1");
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:38,代码来源:class.ilPersonalSettingsGUI.php


注:本文中的ilMail::sendMimeMail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。