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


PHP Zend_Mail::Send方法代碼示例

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


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

示例1: date

     $message .= "=======================================================\n\n";
     $message .= "Submitted At:\t\t" . date("r", time()) . "\n";
     $message .= "Submitted By:\t\t" . $fullname . " [" . (isset($_POST["hide_identity"]) ? "withheld" : $_SESSION["details"]["username"]) . "]\n";
     $message .= "E-Mail Address:\t\t" . $email_address . "\n\n";
     $message .= "Comments / Feedback:\n";
     $message .= "-------------------------------------------------------\n";
     $message .= clean_input($_POST["feedback"], array("trim", "emailcontent")) . "\n\n";
     $message .= "Web-Browser / OS:\n";
     $message .= "-------------------------------------------------------\n";
     $message .= clean_input($_SERVER["HTTP_USER_AGENT"], array("trim", "emailcontent")) . "\n\n";
     $message .= "URL Sent From:\n";
     $message .= "-------------------------------------------------------\n";
     $message .= (isset($_SERVER["HTTPS"]) ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"] . clean_input($extracted_information["url"], array("trim", "emailcontent")) . "\n\n";
     $message .= "=======================================================";
     $mail->setBodyText($message);
     if ($mail->Send()) {
         echo "<h4>Feedback Submission Successful</h4>";
         add_success("Thank-you for providing us with your valuable feedback.<br /><br />Once again, thank-you for using our automated anonymous feedback system and feel free to submit comments any time.");
         echo display_success();
         echo "<div style=\"text-align:right;\"><input type=\"button\" class=\"btn\" value=\"Close\" /></a>";
     } else {
         add_error("We apologize however, we are unable to submit your feedback at this time due to a problem with the mail server.<br /><br />The system administrator has been informed of this error, please try again later.");
         echo display_error();
         application_log("error", "Unable to send anonymous feedback with the anonymous feedback agent.");
     }
 } else {
     add_error("We apologize however, we are unable to submit your feedback at this time due to a problem with the mail server.<br /><br />The system administrator has been informed of this error, please try again later.");
     echo display_error();
     application_log("error", "An error ocurred when trying to send feedback to agent [" . $WHO . "], no recipients found in language file.");
 }
 break;
開發者ID:nadeemshafique,項目名稱:entrada-1x,代碼行數:31,代碼來源:agent-feedback.php


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