summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authornisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in>2013-02-18 12:48:51 +0100
committernisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in>2013-02-18 12:48:51 +0100
commit758f40c3d971837d739fa5bc47529bccc846dcfd (patch)
tree57a9fc2f1a4b960fa6da5a6a8ed681d9b0505598 /system/libraries
parent9ecde434cf660da53c8887f4e768f37fdf64dac1 (diff)
Fixed curly braces. Removed redundant method set_useragent()
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Email.php31
1 files changed, 11 insertions, 20 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 7ea49a959..b0d0921eb 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -416,8 +416,10 @@ class CI_Email {
*/
public function __destruct()
{
- if(is_resource($this->_smtp_connect))
+ if (is_resource($this->_smtp_connect))
+ {
$this->_send_command('quit');
+ }
}
// --------------------------------------------------------------------
@@ -789,23 +791,6 @@ class CI_Email {
}
// --------------------------------------------------------------------
-
- /**
- * Set Useragent
- *
- * @param string
- * @return void
- */
- public function set_useragent($type = '')
- {
- if( ! $type)
- $this->useragent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'PHP/'.phpversion();
- else
- $this->useragent = $type;
- return $this;
- }
-
- // --------------------------------------------------------------------
/**
* Set Wordwrap
@@ -1861,10 +1846,14 @@ class CI_Email {
return FALSE;
}
- if($this->smtp_keepalive)
+ if ($this->smtp_keepalive)
+ {
$this->_send_command('reset');
+ }
else
+ {
$this->_send_command('quit');
+ }
return TRUE;
}
@@ -1879,7 +1868,7 @@ class CI_Email {
*/
protected function _smtp_connect($force=FALSE)
{
- if( ! is_resource($this->_smtp_connect) || $force)
+ if ( ! is_resource($this->_smtp_connect) || $force)
{
$ssl = ($this->smtp_crypto === 'ssl') ? 'ssl://' : NULL;
@@ -2026,7 +2015,9 @@ class CI_Email {
$reply = $this->_get_smtp_data();
if (strpos($reply, '503') !== 0) // Already authenticated
+ {
return TRUE;
+ }
if (strpos($reply, '334') !== 0)
{