當前位置: 首頁>>代碼示例>>PHP>>正文


PHP NotificationMail::SetFrom方法代碼示例

本文整理匯總了PHP中NotificationMail::SetFrom方法的典型用法代碼示例。如果您正苦於以下問題:PHP NotificationMail::SetFrom方法的具體用法?PHP NotificationMail::SetFrom怎麽用?PHP NotificationMail::SetFrom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在NotificationMail的用法示例。


在下文中一共展示了NotificationMail::SetFrom方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testNotification

 static function testNotification()
 {
     global $CFG_GLPI, $LANG;
     $mmail = new NotificationMail();
     $mmail->AddCustomHeader("Auto-Submitted: auto-generated");
     $mmail->SetFrom($CFG_GLPI["admin_email"], $CFG_GLPI["admin_email_name"]);
     $mmail->AddAddress($CFG_GLPI["admin_email"], $CFG_GLPI["admin_email_name"]);
     $mmail->Subject = "[GLPI] " . $LANG['mailing'][32];
     $mmail->Body = $LANG['mailing'][31] . "\n-- \n" . $CFG_GLPI["mailing_signature"];
     if (!$mmail->Send()) {
         addMessageAfterRedirect($LANG['setup'][206], false, ERROR);
     } else {
         addMessageAfterRedirect($LANG['setup'][205]);
     }
 }
開發者ID:ryukansent,項目名稱:Thesis-SideB,代碼行數:15,代碼來源:notificationmail.class.php

示例2: sendMailRefusedResponse

 function sendMailRefusedResponse($to = '', $subject = '')
 {
     global $CFG_GLPI, $LANG;
     $mmail = new NotificationMail();
     $mmail->AddCustomHeader("Auto-Submitted: auto-replied");
     $mmail->SetFrom($CFG_GLPI["admin_email"], $CFG_GLPI["admin_email_name"]);
     $mmail->AddAddress($to);
     $mmail->Subject = $LANG['mailgate'][16] . ' ' . $subject;
     $mmail->Body = $LANG['mailgate'][9] . "\n-- \n" . $CFG_GLPI["mailing_signature"];
     $mmail->Send();
 }
開發者ID:ryukansent,項目名稱:Thesis-SideB,代碼行數:11,代碼來源:mailcollector.class.php

示例3: sendMailRefusedResponse

 /**
  * @param $to        (default '')
  * @param $subject   (default '')
  **/
 function sendMailRefusedResponse($to = '', $subject = '')
 {
     global $CFG_GLPI;
     $mmail = new NotificationMail();
     $mmail->AddCustomHeader("Auto-Submitted: auto-replied");
     $mmail->SetFrom($CFG_GLPI["admin_email"], $CFG_GLPI["admin_email_name"]);
     $mmail->AddAddress($to);
     // Normalized header, no translation
     $mmail->Subject = 'Re: ' . $subject;
     $mmail->Body = __("Your email could not be processed.\nIf the problem persists, contact the administrator") . "\n-- \n" . $CFG_GLPI["mailing_signature"];
     $mmail->Send();
 }
開發者ID:geldarr,項目名稱:hack-space,代碼行數:16,代碼來源:mailcollector.class.php


注:本文中的NotificationMail::SetFrom方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。