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


PHP Zend_Mail_Protocol_Smtp::rset方法代碼示例

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


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

示例1: _sendMail

 /**
  * Send an email via the SMTP connection protocol
  *
  * The connection via the protocol adapter is made just-in-time to allow a
  * developer to add a custom adapter if required before mail is sent.
  *
  * @return void
  * @todo Rename this to sendMail, it's a public method...
  */
 public function _sendMail()
 {
     // If sending multiple messages per session use existing adapter
     if (!$this->_connection instanceof Zend_Mail_Protocol_Smtp) {
         // Check if authentication is required and determine required class
         $connectionClass = 'Zend_Mail_Protocol_Smtp';
         if ($this->_auth) {
             $connectionClass .= '_Auth_' . ucwords($this->_auth);
         }
         if (!class_exists($connectionClass)) {
             Zend_Loader::loadClass($connectionClass);
         }
         $this->setConnection(new $connectionClass($this->_host, $this->_port, $this->_config));
         $this->_connection->connect();
         $this->_connection->helo($this->_name);
     } else {
         // Reset connection to ensure reliable transaction
         $this->_connection->rset();
     }
     // Set sender email address
     $this->_connection->mail($this->_mail->getReturnPath());
     // Set recipient forward paths
     foreach ($this->_mail->getRecipients() as $recipient) {
         $this->_connection->rcpt($recipient);
     }
     // Issue DATA command to client
     $this->_connection->data($this->header . Zend_Mime::LINEEND . $this->body);
 }
開發者ID:kobmaki,項目名稱:icingaweb2,代碼行數:37,代碼來源:Smtp.php

示例2: testRsetExpects220

 /**
  * @depends testEhlo
  * @group ZF-1377
  */
 public function testRsetExpects220()
 {
     $expectedDialog = $this->_connectAndEhlo();
     // Microsoft ESMTP server responds to RSET with 220 rather than 250
     $this->_protocol->responseBuffer = array('220 OK');
     $expectedDialog[] = 'RSET';
     $expectedDialog[] = '220 OK';
     $this->_protocol->rset();
     $this->assertEquals($expectedDialog, $this->_protocol->dialog);
 }
開發者ID:omusico,項目名稱:logica,代碼行數:14,代碼來源:SmtpProtocolTest.php


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