Esempio n. 1
0
 /**
  * Have a polite greeting with the server and work out what it's capable of
  * @param Swift_Events_ResponseEvent The initial service line respoonse
  * @throws Swift_ConnectionException If conversation is not going very well
  */
 protected function handshake(Swift_Events_ResponseEvent $greeting)
 {
     if ($this->connection->getRequiresEHLO() || strpos($greeting->getString(), "ESMTP")) {
         $this->setConnectionExtensions($this->command("EHLO " . $this->domain, 250));
     } else {
         $this->command("HELO " . $this->domain, 250);
     }
     //Connection might want to do something like authenticate now
     if (!$this->hasOption(self::NO_POST_CONNECT)) {
         $this->connection->postConnect($this);
     }
 }
Esempio n. 2
0
 /**
  * Have a polite greeting with the server and work out what it's capable of
  * @param Swift_Events_ResponseEvent The initial service line respoonse
  * @throws Swift_ConnectionException If conversation is not going very well
  */
 function handshake(&$greeting)
 {
     if (!is_a($greeting, "Swift_Events_ResponseEvent")) {
         trigger_error("Swift::handshake expects parameter 1 to be of type Swift_Events_ResponseEvent.");
         return;
     }
     if ($this->connection->getRequiresEHLO() || strpos($greeting->getString(), "ESMTP")) {
         $this->setConnectionExtensions($this->command("EHLO " . $this->domain, 250));
     } else {
         $this->command("HELO " . $this->domain, 250);
     }
     //Connection might want to do something like authenticate now
     if (!$this->hasOption($this->NO_POST_CONNECT)) {
         $this->connection->postConnect($this);
     }
 }