Skip to content

Commit

Permalink
Merge pull request #1 from fiftin/trunk
Browse files Browse the repository at this point in the history
Add Net_SMTP::socket_options support.
  • Loading branch information
CloCkWeRX committed Mar 22, 2014
2 parents 394b95f + dab659c commit 3e08a7c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Mail/smtp.php
Expand Up @@ -162,6 +162,8 @@ class Mail_smtp extends Mail {
* @var bool
*/
var $pipelining;

var $socket_options = array();

/**
* Constructor.
Expand Down Expand Up @@ -200,7 +202,7 @@ function Mail_smtp($params)
if (isset($params['debug'])) $this->debug = (bool)$params['debug'];
if (isset($params['persist'])) $this->persist = (bool)$params['persist'];
if (isset($params['pipelining'])) $this->pipelining = (bool)$params['pipelining'];

if (isset($params['socket_options'])) $this->socket_options = $params['socket_options'];
// Deprecated options
if (isset($params['verp'])) {
$this->addServiceExtensionParameter('XVERP', is_bool($params['verp']) ? null : $params['verp']);
Expand Down Expand Up @@ -349,7 +351,9 @@ function &getSMTPObject()
$this->_smtp = new Net_SMTP($this->host,
$this->port,
$this->localhost,
$this->pipelining);
$this->pipelining,
0,
$this->socket_options);

/* If we still don't have an SMTP object at this point, fail. */
if (is_object($this->_smtp) === false) {
Expand Down

0 comments on commit 3e08a7c

Please sign in to comment.