forked from Wavyzz/dolibarr
Fix norsh
This commit is contained in:
@@ -435,6 +435,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
{
|
||||
print $e->getMessage();
|
||||
}
|
||||
|
||||
$morehtml .= $form->textwithpicto('', 'connect string '.$connectstringserver);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -667,16 +667,20 @@ class EmailCollector extends CommonObject
|
||||
/**
|
||||
* Return the connectstring to use with IMAP connection function
|
||||
*
|
||||
* @param int $norsh Add /norsh to connectstring
|
||||
* @return string
|
||||
*/
|
||||
public function getConnectStringIMAP()
|
||||
public function getConnectStringIMAP($ssl = 1, $norsh = 0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Connect to IMAP
|
||||
$flags = '/service=imap'; // IMAP
|
||||
$flags .= '/ssl'; // '/tls'
|
||||
if ($ssl) $flags .= '/ssl'; // '/tls'
|
||||
$flags .= '/novalidate-cert';
|
||||
//$flags.='/readonly';
|
||||
//$flags.='/debug';
|
||||
if ($norsh || ! empty($conf->global->IMPA_FORCE_NORSH)) $flags .= '/norsh';
|
||||
|
||||
$connectstringserver = '{'.$this->host.':993'.$flags.'}';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user