mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:10:13 +01:00
Added support for imap-ssl for the gui import
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
828964ec4c
commit
a31f5b7a26
@ -48,11 +48,15 @@ class ControllerImportTest extends Controller {
|
||||
|
||||
}
|
||||
|
||||
else if($this->request->post['type'] == 'imap') {
|
||||
else if($this->request->post['type'] == 'imap' || $this->request->post['type'] == 'imap-ssl') {
|
||||
$ssl = false;
|
||||
if($this->request->post['type'] == 'imap-ssl') {
|
||||
$ssl = 'SSL';
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
$conn = new Zend_Mail_Protocol_Imap($this->request->post['server'], '143', false);
|
||||
$conn = new Zend_Mail_Protocol_Imap($this->request->post['server'], null, $ssl);
|
||||
|
||||
$login = $conn->login($this->request->post['username'], $this->request->post['password']);
|
||||
|
||||
@ -61,7 +65,7 @@ class ControllerImportTest extends Controller {
|
||||
} else {
|
||||
print "<span class=\"text-error\">" . $this->request->post['username'] . ": " . $lang->data['text_login_failed'] . "</span> ";
|
||||
}
|
||||
|
||||
|
||||
} catch (Zend_Mail_Protocol_Exception $e) {
|
||||
print "<span class=\"text-error\">" . $this->request->post['server'] . ": " . $lang->data['text_connection_failed'] . "</span> ";
|
||||
}
|
||||
@ -76,5 +80,3 @@ class ControllerImportTest extends Controller {
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -31,6 +31,7 @@
|
||||
<select name="type" id="type">
|
||||
<option value="pop3"<?php if(isset($a['type']) && $a['type'] == 'pop3') { ?> selected="selected"<?php } ?>>pop3</option>
|
||||
<option value="imap"<?php if(isset($a['type']) && $a['type'] == 'imap') { ?> selected="selected"<?php } ?>>imap</option>
|
||||
<option value="imap-ssl"<?php if(isset($a['type']) && $a['type'] == 'imap-ssl') { ?> selected="selected"<?php } ?>>imap-ssl</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -43,7 +44,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group<?php if(isset($errors['username'])){ print " error"; } ?>">
|
||||
<label class="control-label" for="username"><?php print $text_username; ?>:</label>
|
||||
<label class="control-label" for="username"><?php print $text_username; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="username" id="username" placeholder="" value="<?php if(isset($a['username'])) { print $a['username']; } ?>" />
|
||||
<?php if ( isset($errors['username']) ) { ?><span class="help-inline"><?php print $errors['username']; ?></span><?php } ?>
|
||||
|
Loading…
Reference in New Issue
Block a user