login() public method

Connect/login to the SMTP server.
public login ( )
Exemplo n.º 1
0
 /**
  * Connect to the SMTP server by instantiating a Horde_Smtp object.
  *
  * @return Horde_Smtp  The SMTP object.
  * @throws Horde_Mail_Exception
  */
 public function getSMTPObject()
 {
     if (!$this->_smtp) {
         $this->_smtp = new Horde_Smtp($this->_params);
         try {
             $this->_smtp->login();
         } catch (Horde_Smtp_Exception $e) {
             throw new Horde_Mail_Exception($e);
         }
     }
     return $this->_smtp;
 }