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.
|
||||
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 );
|
||||
$_retVal = false;
|
||||
}
|
||||
@@ -2517,6 +2519,9 @@ class SMTPs
|
||||
|
||||
/**
|
||||
* $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
|
||||
* 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);
|
||||
$result=$this->smtps->sendMsg();
|
||||
if (! $result)
|
||||
{
|
||||
$this->error=$this->smtps->getErrors();
|
||||
}
|
||||
//print $result;
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail();
|
||||
|
||||
$result=$this->smtps->getErrors();
|
||||
if (empty($this->error) && empty($result)) $res=true;
|
||||
else $res=false;
|
||||
else
|
||||
{
|
||||
if (empty($this->error)) $this->error=$result;
|
||||
$res=false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user