/**
  * @return string
  */
 function ToString($withoutBcc = false)
 {
     $retval = $this->Headers->ToString($withoutBcc) . CRLF;
     $retval .= $this->_body;
     if ($this->_subParts != null) {
         $retval .= $this->_subParts->ToString();
     }
     return $retval;
 }
 /**
  * @return \MailSo\Mime\Part
  */
 public function Reset()
 {
     \MailSo\Base\ResourceRegistry::CloseMemoryResource($this->Body);
     $this->Body = null;
     $this->Headers = HeaderCollection::NewInstance();
     $this->SubParts = PartCollection::NewInstance();
     $this->LineParts = array();
     $this->sBoundary = '';
     $this->sParentCharset = \MailSo\Base\Enumerations\Charset::ISO_8859_1;
     return $this;
 }
Beispiel #3
0
 /**
  * 发送响应头到客户端
  */
 protected function sendHeaders()
 {
     $statusCode = $this->getStatusCode();
     header("HTTP/{$this->version} {$statusCode} {$this->statusText}");
     if ($this->_headers instanceof HeadersInterface) {
         $this->_headers->send();
     }
     return $this;
 }