forked from Wavyzz/dolibarr
Fix: Can provide ip address on smtps. Better error reporting.
This commit is contained in:
@@ -658,6 +658,8 @@ class SMTPs
|
|||||||
// This connection attempt failed.
|
// This connection attempt failed.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// DOL_CHANGE LDR
|
||||||
|
if (empty($this->errstr)) $this->errstr='Failed to connect with fsockopen host='.$this->getHost().' port='.$this->getPort();
|
||||||
$this->_setErr ( $this->errno, $this->errstr );
|
$this->_setErr ( $this->errno, $this->errstr );
|
||||||
$_retVal = false;
|
$_retVal = false;
|
||||||
}
|
}
|
||||||
@@ -2517,6 +2519,9 @@ class SMTPs
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.13 2010/04/13 20:58:37 eldy
|
||||||
|
* Fix: Can provide ip address on smtps. Better error reporting.
|
||||||
|
*
|
||||||
* Revision 1.12 2010/04/13 20:30:25 eldy
|
* Revision 1.12 2010/04/13 20:30:25 eldy
|
||||||
* Fix: Can provide ip address on smtps. Better error reporting.
|
* Fix: Can provide ip address on smtps. Better error reporting.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -401,17 +401,18 @@ class CMailFile
|
|||||||
{
|
{
|
||||||
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->smtps->setDebug(true);
|
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->smtps->setDebug(true);
|
||||||
$result=$this->smtps->sendMsg();
|
$result=$this->smtps->sendMsg();
|
||||||
if (! $result)
|
//print $result;
|
||||||
{
|
|
||||||
$this->error=$this->smtps->getErrors();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail();
|
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail();
|
||||||
|
|
||||||
$result=$this->smtps->getErrors();
|
$result=$this->smtps->getErrors();
|
||||||
if (empty($this->error) && empty($result)) $res=true;
|
if (empty($this->error) && empty($result)) $res=true;
|
||||||
else $res=false;
|
else
|
||||||
|
{
|
||||||
|
if (empty($this->error)) $this->error=$result;
|
||||||
|
$res=false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user