1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-25 03:43:33 +01:00

Removing INBOX as default IMAP folder

This commit is contained in:
Rohit Singhal 2020-03-09 08:07:12 +05:30
parent 180380339d
commit a51189e6f6
3 changed files with 4 additions and 14 deletions

View File

@ -107,14 +107,7 @@ class FetchEmails extends Command
// Connect to the Server
$client->connect();
// Get INBOX folder
$folders = [];
$folder = $client->getFolder('INBOX');
if (!$folder) {
throw new \Exception('Could not get mailbox folder: INBOX', 1);
}
$folders[] = $folder;
// Fetch emails from custom IMAP folders.
if ($mailbox->in_protocol == Mailbox::IN_PROTOCOL_IMAP) {

View File

@ -325,10 +325,8 @@ class MailboxesController extends Controller
// Save all custom folders except INBOX.
$in_imap_folders = [];
foreach ($request->in_imap_folders as $imap_folder) {
if (mb_strtolower($imap_folder) != 'inbox') {
$in_imap_folders[] = $imap_folder;
}
}
$mailbox->setInImapFolders($in_imap_folders);
$mailbox->save();

View File

@ -126,7 +126,6 @@
<div class="col-sm-6 flexy">
<select id="in_imap_folders" class="form-control input-sized" name="in_imap_folders[]" multiple>
<option value="INBOX" selected="selected">INBOX</option>
@foreach ($mailbox->getInImapFolders() as $imap_folder)
<option value="{{ $imap_folder }}" selected="selected">{{ $imap_folder }}</option>
@endforeach