mirror of
https://github.com/retailcrm/legacy.git
synced 2025-02-16 14:53:16 +03:00
Merge pull request #11 from gwinn/master
nvalidArgumentException, custom mail folder
This commit is contained in:
commit
e836c6ae64
@ -18,7 +18,7 @@ driver=mysql
|
||||
enabled=false
|
||||
|
||||
[mail]
|
||||
mail@example.com=login,password,imap.example.com,993,imap
|
||||
mail@example.com=login,password,imap.example.com,993,imap,SpecialFolderName
|
||||
mail@example.org=login,password,pop.example.org,995,pop
|
||||
enabled=false
|
||||
|
||||
|
@ -13,7 +13,7 @@ class Mail
|
||||
$this->mailBox = $mailBox;
|
||||
|
||||
if (is_array($this->container->mail)) {
|
||||
if(isset($this->container->mail[$mailBox])) {
|
||||
if (isset($this->container->mail[$mailBox])) {
|
||||
$this->mailSettings = explode(
|
||||
',',
|
||||
$this->container->mail[$mailBox]
|
||||
@ -32,6 +32,7 @@ class Mail
|
||||
|
||||
public function parse()
|
||||
{
|
||||
|
||||
$server = new Server(
|
||||
$this->mailSettings[2],
|
||||
$this->mailSettings[3],
|
||||
@ -43,6 +44,10 @@ class Mail
|
||||
$this->mailSettings[1]
|
||||
);
|
||||
|
||||
if (!empty($this->mailSettings[5])) {
|
||||
$server->setMailBox($this->mailSettings[5]);
|
||||
}
|
||||
|
||||
$mailCriteria = $this->clean($this->mailBox, 'criteria');
|
||||
$mailHandler = $this->clean($this->mailBox, 'handler');
|
||||
|
||||
|
@ -46,23 +46,22 @@ class RequestProxy
|
||||
"[$method] " . $e->getMessage() . "\n",
|
||||
$this->container->errorLog
|
||||
);
|
||||
|
||||
|
||||
return null;
|
||||
} catch (InvalidJsonException $e) {
|
||||
$this->logger->write(
|
||||
"[$method] " . $e->getMessage() . "\n",
|
||||
$this->container->errorLog
|
||||
);
|
||||
|
||||
|
||||
return null;
|
||||
} catch (InvalidArgumentException $e) {
|
||||
$this->logger->write(
|
||||
"[$method] " . $e->getMessage() . "\n",
|
||||
$this->container->errorLog
|
||||
);
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user