2
0
forked from Wavyzz/dolibarr

Fix norsh

This commit is contained in:
Laurent Destailleur
2019-11-21 20:07:22 +01:00
parent 432a37522b
commit c9b79c8aa1
2 changed files with 8 additions and 2 deletions

View File

@@ -435,6 +435,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
print $e->getMessage();
}
$morehtml .= $form->textwithpicto('', 'connect string '.$connectstringserver);
}
else
{

View File

@@ -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.'}';