Esempio n. 1
0
 /**
  * SMTP DATA
  * SUCCESS 354
  * SUCCESS 250
  * @return $this
  * @throws CodeException
  * @throws SMTPException
  */
 protected function data()
 {
     $in = "DATA" . $this->CRLF;
     $code = $this->pushStack($in);
     if ($code !== '354') {
         throw new CodeException('354', $code, array_pop($this->resultStack));
     }
     $in = $this->message->toString();
     $code = $this->pushStack($in);
     if ($code !== '250') {
         throw new CodeException('250', $code, array_pop($this->resultStack));
     }
     return $this;
 }