Skip to content
Snippets Groups Projects
Commit 7445869d authored by Jared Hancock's avatar Jared Hancock
Browse files

email: Add warning for archive folder for POP

This patch adds an error to the page if unable to configure the archive
folder and POP was selected as the mailbox protocol. Generally, POP servers
do not support anything but the INBOX
parent f1e31ba6
Branches 60-implement-internal-storage
No related tags found
No related merge requests found
......@@ -296,8 +296,12 @@ class Email {
if(!isset($vars['postfetch']))
$errors['postfetch']=__('Indicate what to do with fetched emails');
elseif(!strcasecmp($vars['postfetch'],'archive') && !$vars['mail_archivefolder'] )
$errors['postfetch']=__('Valid folder required');
elseif(!strcasecmp($vars['postfetch'],'archive')) {
if ($vars['mail_protocol'] == 'POP')
$errors['postfetch'] = __('POP mail servers do not support folders');
elseif (!$vars['mail_archivefolder'])
$errors['postfetch'] = __('Valid folder required');
}
}
if($vars['smtp_active']) {
......
......@@ -218,7 +218,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
<td>
<span>
<select name="mail_proto">
<option value=''>&mdash; <?php __('Select protocol'); ?> &mdash;</option>
<option value=''>&mdash; <?php echo __('Select protocol'); ?> &mdash;</option>
<?php
foreach (MailFetcher::getSupportedProtos() as $proto=>$desc) { ?>
<option value="<?php echo $proto; ?>" <?php
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment