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