select imap folders
This commit is contained in:
@@ -24,17 +24,23 @@ namespace Espo\Modules\Crm\Controllers;
|
||||
|
||||
class InboundEmail extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
|
||||
public function actionFetch($params, $data, $request)
|
||||
protected function checkGlobalAccess()
|
||||
{
|
||||
$id = $request->get('id');
|
||||
try {
|
||||
$this->getRecordService()->fetchFromMailServer($id);
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
echo "--";
|
||||
die;
|
||||
}
|
||||
|
||||
public function actionGetFolders($params, $data, $request)
|
||||
{
|
||||
return $this->getRecordService()->getFolders(array(
|
||||
'host' => $request->get('host'),
|
||||
'port' => $request->get('port'),
|
||||
'ssl' => $request->get('ssl'),
|
||||
'username' => $request->get('username'),
|
||||
'password' => $request->get('password'),
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user