Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Added missing return
Browse files Browse the repository at this point in the history
  • Loading branch information
RWOverdijk committed Jan 30, 2013
1 parent ee45d7b commit cb78c2a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions library/Zend/Mail/Transport/Smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,19 +308,20 @@ protected function prepareBody(Message $message)
}

/**
* Lazy load the connection, and pass it helo
* Lazy load the connection
*
* @return Protocol\Smtp
*/
protected function lazyLoadConnection()
{
// Check if authentication is required and determine required class
$options = $this->getOptions();
$config = $options->getConnectionConfig();
$config['host'] = $options->getHost();
$config['port'] = $options->getPort();
$connection = $this->plugin($options->getConnectionClass(), $config);
$options = $this->getOptions();
$config = $options->getConnectionConfig();
$config['host'] = $options->getHost();
$config['port'] = $options->getPort();
$connection = $this->plugin($options->getConnectionClass(), $config);
$this->connection = $connection;

return $this->connect();
}

Expand All @@ -332,10 +333,12 @@ protected function lazyLoadConnection()
protected function connect()
{
if (!$this->connection instanceof Protocol\Smtp) {
$this->lazyLoadConnection();
return $this->lazyLoadConnection();
}

$this->connection->connect();
$this->connection->helo($this->getOptions()->getName());

return $this->connection;
}
}

0 comments on commit cb78c2a

Please sign in to comment.