mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-22 21:30:54 +01:00
* EMailAdmin allow to specify smtp auth credentials for alarms/notifications only, otherwise credentials of current user are used
This commit is contained in:
parent
c1fa4cd3e9
commit
bba3dba9ac
@ -308,7 +308,8 @@ class emailadmin_bo extends so_sql
|
||||
'ea_default_domain' => 'mail_suffix',
|
||||
'ea_smtp_server' => 'smtp_server',
|
||||
'ea_smtp_port' => 'smtp_port',
|
||||
)+($this->data['ea_smtp_auth']=='yes' ? array( //ToDo: if no, we may have to reset config values for that too?
|
||||
)+($this->data['ea_smtp_auth']!='no' ? array( //ToDo: if no, we may have to reset config values for that too?
|
||||
'ea_smtp_auth' => 'smtpAuth',
|
||||
'ea_smtp_auth_username' => 'smtp_auth_user',
|
||||
'ea_smtp_auth_password' => 'smtp_auth_passwd',
|
||||
) : array()) as $ea_name => $config_name)
|
||||
@ -700,9 +701,9 @@ class emailadmin_bo extends so_sql
|
||||
$ogServer->host = $data['smtpServer'];
|
||||
$ogServer->port = $data['smtpPort'];
|
||||
$ogServer->editForwardingAddress = ($data['editforwardingaddress'] == 'yes');
|
||||
$ogServer->smtpAuth = $data['smtpAuth'] == 'yes';
|
||||
$ogServer->smtpAuth = ($data['smtpAuth'] == 'yes' || $data['smtpAuth'] == 'ann' );
|
||||
if($ogServer->smtpAuth) {
|
||||
if(!empty($data['ea_smtp_auth_username'])) {
|
||||
if(!empty($data['ea_smtp_auth_username']) && $data['smtpAuth'] == 'yes') {
|
||||
$ogServer->username = $data['ea_smtp_auth_username'];
|
||||
} else {
|
||||
// if we use special logintypes for IMAP, we assume this to be used for SMTP too
|
||||
@ -714,7 +715,7 @@ class emailadmin_bo extends so_sql
|
||||
$ogServer->username = $GLOBALS['egw_info']['user']['account_lid'];
|
||||
}
|
||||
}
|
||||
if(!empty($data['ea_smtp_auth_password'])) {
|
||||
if(!empty($data['ea_smtp_auth_password']) && $data['smtpAuth'] == 'yes') {
|
||||
$ogServer->password = $data['ea_smtp_auth_password'];
|
||||
} else {
|
||||
$ogServer->password = $GLOBALS['egw_info']['user']['passwd'];
|
||||
@ -825,8 +826,8 @@ class emailadmin_bo extends so_sql
|
||||
{
|
||||
if (($profiles = $this->soemailadmin->getProfileList(0,true)))
|
||||
{
|
||||
//error_log(__METHOD__.__LINE__.' Found profile 2 merge');
|
||||
$profile = array_shift($profiles);
|
||||
//error_log(__METHOD__.__LINE__.' Found profile 2 merge:'.array2string($profile));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -862,14 +863,16 @@ class emailadmin_bo extends so_sql
|
||||
'mail_suffix' => 'defaultDomain',
|
||||
'smtp_server' => 'smtpServer',
|
||||
'smtp_port' => 'smtpPort',
|
||||
'smtpAuth' => 'ea_smtp_auth',
|
||||
'smtp_auth_user' => 'ea_smtp_auth_username',
|
||||
'smtp_auth_passwd' => 'ea_smtp_auth_password',
|
||||
) as $setup_name => $ea_name_data)
|
||||
{
|
||||
if ($setup_name == 'smtp_auth_passwd' && empty($settings[$setup_name]) && !empty($settings['smtp_auth_user']) && $settings['smtpAuth'] != 'no') continue;
|
||||
if (!is_array($ea_name_data))
|
||||
{
|
||||
$profile[$ea_name_data] = $settings[$setup_name];
|
||||
if ($setup_name == 'smtp_auth_user') $profile['stmpAuth'] = !empty($settings['smtp_auth_user']);
|
||||
//if ($setup_name == 'smtp_auth_user' && $profile['smtpAuth'] == 'no' && !empty($settings['smtp_auth_user'])) $profile['smtpAuth'] = 'yes';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -891,7 +894,8 @@ class emailadmin_bo extends so_sql
|
||||
}
|
||||
// merge the other not processed values unchanged
|
||||
$profile = array_merge($profile,array_diff_assoc($settings,$to_parse));
|
||||
//error_log(__METHOD__.__LINE__.' Profile to Save:'.array2string($profile).' Profile to Parse:'.array2string($to_parse));
|
||||
//error_log(__METHOD__.__LINE__.' Profile to Save:'.array2string($profile));
|
||||
//error_log(__METHOD__.__LINE__.' Profile to Parse:'.array2string($to_parse));
|
||||
$this->soemailadmin->updateProfile($profile);
|
||||
self::$sessionData['profile'] = array();
|
||||
$this->saveSessionData();
|
||||
|
@ -14,7 +14,7 @@
|
||||
* User interface
|
||||
*/
|
||||
class emailadmin_ui extends emailadmin_bo
|
||||
{
|
||||
{
|
||||
var $public_functions = array
|
||||
(
|
||||
'index' => True,
|
||||
@ -24,7 +24,7 @@ class emailadmin_ui extends emailadmin_bo
|
||||
'save' => True,
|
||||
'listProfiles' => True,
|
||||
);
|
||||
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
@ -56,7 +56,7 @@ class emailadmin_ui extends emailadmin_bo
|
||||
}
|
||||
if ($rowsfound)
|
||||
{
|
||||
if (($accountID || !empty($groupID)) && $rowsfound == 1)
|
||||
if (($accountID || !empty($groupID)) && $rowsfound == 1)
|
||||
{
|
||||
$linkData = array
|
||||
(
|
||||
@ -189,7 +189,7 @@ class emailadmin_ui extends emailadmin_bo
|
||||
if (!empty($filter)) foreach ($filter as $fk => $fv) $content['nm']['col_filter'][$fk] = $fv;
|
||||
// seTting the Title of the app
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('emailadmin');
|
||||
$tpl->exec('emailadmin.emailadmin_ui.index',$content,$sel_options,$readonlys,array('nm' => $content['nm']));
|
||||
$tpl->exec('emailadmin.emailadmin_ui.index',$content,$sel_options,$readonlys,array('nm' => $content['nm']));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -251,6 +251,20 @@ class emailadmin_ui extends emailadmin_bo
|
||||
return $returnval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of supported SMTP Auth Config options
|
||||
*
|
||||
* @return array value => label pairs
|
||||
*/
|
||||
static public function getSMTPAuthConfig()
|
||||
{
|
||||
return array(
|
||||
'no' => 'No',
|
||||
'yes' => 'Yes, use credentials of current user or if given credentials below',
|
||||
'ann' => 'Yes, use credentials below only for alarms and notifications, otherwise use credentials of current user',
|
||||
);
|
||||
}
|
||||
|
||||
function edit($content=null)
|
||||
{
|
||||
//$this->editProfile($profileid);
|
||||
@ -334,7 +348,7 @@ class emailadmin_ui extends emailadmin_bo
|
||||
$js .= 'window.close();';
|
||||
echo "<html>\n<body>\n<script>\n$js\n</script>\n</body>\n</html>\n";
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
break;
|
||||
break;
|
||||
case 'cancel':
|
||||
$js .= 'window.close();';
|
||||
echo "<html>\n<body>\n<script>\n$js\n</script>\n</body>\n</html>\n";
|
||||
@ -368,9 +382,9 @@ class emailadmin_ui extends emailadmin_bo
|
||||
}
|
||||
}
|
||||
if ($rowfound) $content = array_merge($this->data,array());
|
||||
$preserv['smtpcapabilities'] = $content['smtpcapabilities'] =
|
||||
$preserv['smtpcapabilities'] = $content['smtpcapabilities'] =
|
||||
constant((!empty($content['ea_smtp_type'])?$content['ea_smtp_type']:'defaultsmtp').'::CAPABILITIES');
|
||||
$preserv['imapcapabilities'] = $content['imapcapabilities'] =
|
||||
$preserv['imapcapabilities'] = $content['imapcapabilities'] =
|
||||
constant((!empty($content['ea_imap_type'])?$content['ea_imap_type']:'defaultimap').'::CAPABILITIES');
|
||||
if (!empty($msg)) $content['msg'] = $msg;
|
||||
list($content['ea_smtp_auth_username'],$content['smtp_senders_email']) = explode(';',$content['ea_smtp_auth_username']);
|
||||
@ -392,7 +406,9 @@ class emailadmin_ui extends emailadmin_bo
|
||||
foreach($this->tracking->field2label as $field => $label) {
|
||||
$sel_options['status'][$field] = lang($label);
|
||||
}
|
||||
/*
|
||||
|
||||
$sel_options['ea_smtp_auth'] = self::getSMTPAuthConfig();
|
||||
/*
|
||||
$content['stored_templates'] = html::checkbox_multiselect(
|
||||
'ea_stationery_active_templates',$content['ea_stationery_active_templates']
|
||||
,$bostationery->get_stored_templates(),true,'',3,true,'width: 100%;');
|
||||
|
@ -148,4 +148,6 @@ users can define their own signatures emailadmin de Anwender können ihre eigene
|
||||
users can utilize these stationery templates emailadmin de Benutzer können diese Briefpapiervorlagen verwenden
|
||||
vaction messages with start- and end-date require an admin account to be set! emailadmin de Urlaubsbenachrichtigungen mit Start- und Enddatum benötigen einen gesetzten Administrator Benutzer!
|
||||
virtual mail manager emailadmin de Virtual MAIL ManaGeR
|
||||
yes, use credentials below only for alarms and notifications, otherwise use credentials of current user emailadmin de Ja, die Daten darunter nur für Alarme und Benachrichtigungen verwenden, ansonsten die Daten des aktiven Benutzers
|
||||
yes, use credentials of current user or if given credentials below emailadmin de Ja, benutze Daten des aktuellen Benutzers oder wenn angegeben die Daten darunter
|
||||
you have received a new message on the emailadmin de Sie haben eine neue Nachricht erhalten
|
||||
|
@ -148,4 +148,6 @@ users can define their own signatures emailadmin en Users can define their own s
|
||||
users can utilize these stationery templates emailadmin en Users can utilize these stationery templates
|
||||
vaction messages with start- and end-date require an admin account to be set! emailadmin en Vacation messages with start and end date require an admin account to be set!
|
||||
virtual mail manager emailadmin en Virtual MAIL ManaGeR
|
||||
yes, use credentials below only for alarms and notifications, otherwise use credentials of current user emailadmin en Yes, use credentials below only for alarms and notifications, otherwise use credentials of current user
|
||||
yes, use credentials of current user or if given credentials below emailadmin en Yes, use credentials of current user or if given credentials below
|
||||
you have received a new message on the emailadmin en You have received a new message on the
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* eGroupWare - eTemplates for Application emailadmin
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2011-03-17 09:42
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package emailadmin
|
||||
* @subpackage setup
|
||||
* @version $Id: class.soetemplate.inc.php 30442 2010-05-30 11:19:50Z ralfbecker $
|
||||
*/
|
||||
* EGroupware - eTemplates for Application emailadmin
|
||||
* http://www.egroupware.org
|
||||
* generated by soetemplate::dump4setup() 2011-09-29 15:08
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package emailadmin
|
||||
* @subpackage setup
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
$templ_version=1;
|
||||
|
||||
@ -22,7 +22,7 @@ $templ_data[] = array('name' => 'emailadmin.edit.IMAP','template' => '','lang' =
|
||||
|
||||
$templ_data[] = array('name' => 'emailadmin.edit.signature','template' => '','lang' => '','group' => '0','version' => '1.7.004','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";i:1;a:5:{s:4:"type";s:4:"grid";s:7:"options";a:0:{}s:4:"data";a:3:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:37:"users can define their own signatures";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:26:"ea_user_defined_signatures";s:4:"size";s:6:"yes,no";}}i:2;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"htmlarea";s:4:"span";s:1:"2";s:4:"name";s:20:"ea_default_signature";s:4:"size";s:17:"advanced,,700,180";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:2;}}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:17:"100%,400,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"400";i:6;s:4:"auto";}}}','size' => '100%,400,,,,,auto','style' => '','modified' => '1270799878',);
|
||||
|
||||
$templ_data[] = array('name' => 'emailadmin.edit.SMTP','template' => '','lang' => '','group' => '0','version' => '1.7.004','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:2:"h4";s:29:",!@smtpcapabilities=/forward/";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:26:"Select type of SMTP Server";}i:2;a:4:{s:4:"type";s:6:"select";s:4:"name";s:12:"ea_smtp_type";s:5:"align";s:5:"right";s:8:"onchange";i:1;}}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:13:"SMTP settings";i:1;a:5:{s:4:"type";s:4:"grid";s:7:"options";a:0:{}s:4:"data";a:3:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:34:"SMTP-Server hostname or IP address";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:14:"ea_smtp_server";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:16:"SMTP-Server Port";}s:1:"B";a:2:{s:4:"type";s:3:"int";s:4:"name";s:12:"ea_smtp_port";}}}s:4:"rows";i:2;s:4:"cols";i:2;}}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:19:"smtp authentication";i:1;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Use SMTP auth";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:12:"ea_smtp_auth";s:4:"size";s:6:"yes,no";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:29:"send using this eMail-Address";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:18:"smtp_senders_email";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"username";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:21:"ea_smtp_auth_username";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"password";}s:1:"B";a:2:{s:4:"type";s:6:"passwd";s:4:"name";s:21:"ea_smtp_auth_password";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:7:"options";a:0:{}}}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:12:"smtp options";i:1;a:5:{s:4:"type";s:4:"grid";s:7:"options";a:0:{}s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:32:"user can edit forwarding address";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:24:"ea_editforwardingaddress";s:4:"size";s:6:"yes,no";}}}s:4:"rows";i:1;s:4:"cols";i:2;}}}}s:4:"rows";i:4;s:4:"cols";i:1;s:4:"size";s:17:"100%,400,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"400";i:6;s:4:"auto";}}}','size' => '100%,400,,,,,auto','style' => '','modified' => '1274772869',);
|
||||
$templ_data[] = array('name' => 'emailadmin.edit.SMTP','template' => '','lang' => '','group' => '0','version' => '1.7.004','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:2:"h4";s:29:",!@smtpcapabilities=/forward/";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:26:"Select type of SMTP Server";}i:2;a:4:{s:4:"type";s:6:"select";s:4:"name";s:12:"ea_smtp_type";s:5:"align";s:5:"right";s:8:"onchange";i:1;}}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:13:"SMTP settings";i:1;a:5:{s:4:"type";s:4:"grid";s:7:"options";a:0:{}s:4:"data";a:3:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:34:"SMTP-Server hostname or IP address";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:14:"ea_smtp_server";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:16:"SMTP-Server Port";}s:1:"B";a:2:{s:4:"type";s:3:"int";s:4:"name";s:12:"ea_smtp_port";}}}s:4:"rows";i:2;s:4:"cols";i:2;}}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:19:"smtp authentication";i:1;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Use SMTP auth";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:12:"ea_smtp_auth";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:29:"send using this eMail-Address";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:18:"smtp_senders_email";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"username";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:21:"ea_smtp_auth_username";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"password";}s:1:"B";a:2:{s:4:"type";s:6:"passwd";s:4:"name";s:21:"ea_smtp_auth_password";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:7:"options";a:0:{}}}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:12:"smtp options";i:1;a:5:{s:4:"type";s:4:"grid";s:7:"options";a:0:{}s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:32:"user can edit forwarding address";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:24:"ea_editforwardingaddress";s:4:"size";s:6:"yes,no";}}}s:4:"rows";i:1;s:4:"cols";i:2;}}}}s:4:"rows";i:4;s:4:"cols";i:1;s:4:"size";s:17:"100%,400,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"400";i:6;s:4:"auto";}}}','size' => '100%,400,,,,,auto','style' => '','modified' => '1274772869',);
|
||||
|
||||
$templ_data[] = array('name' => 'emailadmin.edit.stationery','template' => '','lang' => '','group' => '0','version' => '1.7.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"1";s:5:"label";s:16:"active templates";i:1;a:5:{s:4:"type";s:4:"grid";s:7:"options";a:0:{}s:4:"data";a:3:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:44:"users can utilize these stationery templates";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"name";s:30:"ea_stationery_active_templates";i:1;a:3:{s:4:"type";s:3:"box";s:4:"name";s:30:"ea_stationery_active_templates";s:4:"size";s:3:",10";}s:4:"size";s:1:"5";}}i:2;a:2:{s:1:"A";a:6:{s:4:"type";s:4:"html";s:4:"span";s:1:"2";s:8:"readonly";s:1:"1";s:4:"help";s:27:"manage stationery templates";s:4:"name";s:27:"manage_stationery_templates";s:5:"align";s:5:"right";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:2;s:4:"cols";i:2;}}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:17:"100%,400,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"400";i:6;s:4:"auto";}}}','size' => '100%,400,,,,,auto','style' => '','modified' => '1255600503',);
|
||||
|
||||
|
458
emailadmin/templates/default/edit.xet
Normal file
458
emailadmin/templates/default/edit.xet
Normal file
@ -0,0 +1,458 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="emailadmin.edit.global" template="" lang="" group="0" version="1.7.003">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="Organisation"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="enter your default mail domain (from: user@domain)"/>
|
||||
<textbox id="ea_default_domain"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="name of organisation"/>
|
||||
<textbox id="ea_organisation_name"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="profile access rights"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="can be used by application"/>
|
||||
<menulist>
|
||||
<menupopup id="ea_appname" options="any application"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<description value="can be used by group"/>
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="ea_group" options="any group,groups"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<description value="can be used by user"/>
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="ea_user" options="any user,accounts"/>
|
||||
</menulist>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="global options"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="profile is active"/>
|
||||
<checkbox id="ea_active"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="users can define their own identities"/>
|
||||
<checkbox id="ea_user_defined_identities" options="yes,no"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="users can define their own emailaccounts"/>
|
||||
<checkbox id="ea_user_defined_accounts" options="yes,no"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="order"/>
|
||||
<textbox type="integer" id="ea_order"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="emailadmin.edit.SMTP" template="" lang="" group="0" version="1.7.004">
|
||||
<grid width="100%" height="400" overflow="auto">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<hbox>
|
||||
<description value="Select type of SMTP Server"/>
|
||||
<menulist>
|
||||
<menupopup align="right" id="ea_smtp_type" onchange="1"/>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="SMTP settings"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="SMTP-Server hostname or IP address"/>
|
||||
<textbox id="ea_smtp_server"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="SMTP-Server Port"/>
|
||||
<textbox type="integer" id="ea_smtp_port"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="smtp authentication"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="Use SMTP auth"/>
|
||||
<menulist>
|
||||
<menupopup id="ea_smtp_auth"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<description value="send using this eMail-Address"/>
|
||||
<textbox id="smtp_senders_email"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="username"/>
|
||||
<textbox id="ea_smtp_auth_username"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="password"/>
|
||||
<passwd id="ea_smtp_auth_password"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
<row disabled="!@smtpcapabilities=/forward/">
|
||||
<groupbox>
|
||||
<caption label="smtp options"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="user can edit forwarding address"/>
|
||||
<checkbox id="ea_editforwardingaddress" options="yes,no"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="emailadmin.edit.IMAP" template="" lang="" group="0" version="1.9.001">
|
||||
<grid width="100%" height="400" overflow="auto">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<hbox>
|
||||
<description value="select type of IMAP server"/>
|
||||
<menulist>
|
||||
<menupopup align="right" id="ea_imap_type" onchange="1"/>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="server settings"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="IMAP server hostname or ip address"/>
|
||||
<textbox id="ea_imap_server"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="IMAP server port"/>
|
||||
<textbox type="integer" id="ea_imap_port"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="imap server logintyp"/>
|
||||
<menulist>
|
||||
<menupopup id="ea_imap_login_type" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
<row disabled="!@ea_imap_login_type=admin">
|
||||
<groupbox>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="Use predefined username and password below" span="2"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="username"/>
|
||||
<textbox id="ea_imap_auth_username"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="password"/>
|
||||
<passwd id="ea_imap_auth_password"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="encryption settings"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="encrypted connection"/>
|
||||
<hbox>
|
||||
<radio label="STARTTLS" id="ea_imap_tsl_encryption" options="1"/>
|
||||
<radio label="TLS" id="ea_imap_tsl_encryption" options="2"/>
|
||||
<radio label="SSL" id="ea_imap_tsl_encryption" options="3"/>
|
||||
<radio label="no encryption" id="ea_imap_tsl_encryption" options="0"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<description value="do not validate certificate"/>
|
||||
<checkbox id="ea_imap_tsl_auth" options="yes,no"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
<row disabled="!@imapcapabilities=/sieve/">
|
||||
<groupbox>
|
||||
<caption label="sieve settings"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="enable Sieve"/>
|
||||
<checkbox id="ea_imap_enable_sieve" onchange="1" options="yes,no"/>
|
||||
</row>
|
||||
<row disabled="!@ea_imap_enable_sieve=yes">
|
||||
<description value="Sieve server or ip address"/>
|
||||
<textbox id="ea_imap_sieve_server"/>
|
||||
</row>
|
||||
<row disabled="!@ea_imap_enable_sieve=yes">
|
||||
<description value="Sieve server port"/>
|
||||
<textbox type="integer" id="ea_imap_sieve_port"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Vacation messages with start- and end-date require an admin account to be set" span="2"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
<row disabled="!@imapcapabilities=/admin/">
|
||||
<groupbox>
|
||||
<caption label="Cyrus IMAP server administration"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="enable Cyrus IMAP server administration"/>
|
||||
<checkbox id="ea_imap_enable_cyrus" onchange="1" options="yes,no"/>
|
||||
</row>
|
||||
<row disabled="!@ea_imap_enable_cyrus=yes">
|
||||
<description value="admin username"/>
|
||||
<textbox id="ea_imap_admin_user"/>
|
||||
</row>
|
||||
<row disabled="!@ea_imap_enable_cyrus=yes">
|
||||
<description value="admin password"/>
|
||||
<passwd id="ea_imap_admin_pw"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="emailadmin.edit.signature" template="" lang="" group="0" version="1.7.004">
|
||||
<grid width="100%" height="400" overflow="auto">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<groupbox>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="users can define their own signatures"/>
|
||||
<checkbox id="ea_user_defined_signatures" options="yes,no"/>
|
||||
</row>
|
||||
<row>
|
||||
<htmlarea id="ea_default_signature" mode="advanced" width="700" toolbar="180" span="2"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="emailadmin.edit.stationery" template="" lang="" group="0" version="1.7.003">
|
||||
<grid width="100%" height="400" overflow="auto">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<groupbox>
|
||||
<caption label="active templates"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description value="users can utilize these stationery templates"/>
|
||||
<listbox id="ea_stationery_active_templates" rows="5"/>
|
||||
</row>
|
||||
<row>
|
||||
<html align="right" statustext="manage stationery templates" id="manage_stationery_templates" readonly="true" span="2"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="emailadmin.edit.history" template="" lang="" group="0" version="1.9.001">
|
||||
<grid width="100%" height="400" overflow="auto">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<historylog id="history"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="emailadmin.edit" template="" lang="" group="0" version="1.7.003">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="100%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row disabled="!@msg">
|
||||
<description align="center" id="msg" class="redItalic"/>
|
||||
</row>
|
||||
<row>
|
||||
<grid width="98%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column width="40%"/>
|
||||
<column width="50%"/>
|
||||
<column width="5%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<textbox label="ID" id="ea_profile_id" readonly="true"/>
|
||||
<description value="Profile Name"/>
|
||||
<textbox align="right" id="ea_description"/>
|
||||
<description align="right"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</row>
|
||||
<row>
|
||||
<tabbox id="tabs">
|
||||
<tabs>
|
||||
<tab id="global" label="Global"/>
|
||||
<tab id="SMTP" label="SMTP"/>
|
||||
<tab id="IMAP" label="IMAP"/>
|
||||
<tab id="signature" label="Signature"/>
|
||||
<tab id="stationery" label="Stationery"/>
|
||||
<tab id="history" label="History"/>
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<template id="emailadmin.edit.global"/>
|
||||
<template id="emailadmin.edit.SMTP"/>
|
||||
<template id="emailadmin.edit.IMAP"/>
|
||||
<template id="emailadmin.edit.signature"/>
|
||||
<template id="emailadmin.edit.stationery"/>
|
||||
<template id="emailadmin.edit.history"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</row>
|
||||
<row>
|
||||
<hbox>
|
||||
<hbox>
|
||||
<button label="Save" id="save"/>
|
||||
<button label="Apply" id="apply"/>
|
||||
<button label="Cancel" id="cancel"/>
|
||||
</hbox>
|
||||
<button align="right" label="Delete" id="delete" onclick="return confirm('Do you really want to delete this Profile');"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<styles>
|
||||
.redItalic { color: red; font-style: italics; }
|
||||
</styles>
|
||||
</template>
|
||||
</overlay>
|
116
emailadmin/templates/default/index.xet
Normal file
116
emailadmin/templates/default/index.xet
Normal file
@ -0,0 +1,116 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="emailadmin.index.rows" template="" lang="" group="0" version="1.7.003">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column width="1%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
<nextmatch-sortheader label="ID" id="ea_profile_id"/>
|
||||
<nextmatch-sortheader label="Description" id="ea_description"/>
|
||||
<nextmatch-sortheader label="domainname" id="ea_default_domain"/>
|
||||
<nextmatch-sortheader label="SMTP Server Name" id="ea_smtp_server"/>
|
||||
<nextmatch-header label="SMTP Server Type" id="ea_smtp_type"/>
|
||||
<nextmatch-sortheader label="SMTP Server Port" id="ea_smtp_port"/>
|
||||
<nextmatch-sortheader label="IMAP Server Name" id="ea_imap_server"/>
|
||||
<nextmatch-header label="IMAP Server Type" id="ea_imap_type"/>
|
||||
<nextmatch-sortheader label="IMAP Server Port" id="ea_imap_port"/>
|
||||
<nextmatch-header label="IMAP Server Login Type" id="ea_imap_login_type"/>
|
||||
<nextmatch-header label="Application" id="ea_appname"/>
|
||||
<nextmatch-header label="Group" id="ea_group"/>
|
||||
<nextmatch-header label="User" id="ea_user"/>
|
||||
<nextmatch-sortheader label="order" id="ea_order"/>
|
||||
<nextmatch-sortheader label="Active" id="ea_active"/>
|
||||
<hbox>
|
||||
<description value="Action"/>
|
||||
<buttononly label="Select All" onclick="toggle_all(this.form,form::name('selected[]')); return false;" options="check"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row class="row">
|
||||
<description id="${row}[ea_profile_id]"/>
|
||||
<description id="${row}[ea_description]"/>
|
||||
<description id="${row}[ea_default_domain]"/>
|
||||
<description id="${row}[ea_smtp_server]"/>
|
||||
<menulist>
|
||||
<menupopup id="${row}[ea_smtp_type]" readonly="true"/>
|
||||
</menulist>
|
||||
<description id="${row}[ea_smtp_port]"/>
|
||||
<description id="${row}[ea_imap_server]"/>
|
||||
<menulist>
|
||||
<menupopup id="${row}[ea_imap_type]" readonly="true"/>
|
||||
</menulist>
|
||||
<description id="${row}[ea_imap_port]"/>
|
||||
<description id="${row}[ea_imap_login_type]"/>
|
||||
<menulist>
|
||||
<menupopup id="${row}[ea_appname]" readonly="true"/>
|
||||
</menulist>
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[ea_group]" readonly="true" options=",groups"/>
|
||||
</menulist>
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[ea_user]" readonly="true" options=",accounts"/>
|
||||
</menulist>
|
||||
<description id="${row}[ea_order]" no_lang="1"/>
|
||||
<description id="${row}[ea_active]"/>
|
||||
<hbox>
|
||||
<button statustext="Edit this Profile" label="Edit" id="edit[$row_cont[ea_profile_id]]" onclick="window.open(egw::link('/index.php','menuaction=emailadmin.emailadmin_ui.edit&profileid=$row_cont[ea_profile_id]'),'ea_profile','dependent=yes,width=850,height=540,scrollbars=yes,status=yes'); return false;" image="edit"/>
|
||||
<button statustext="Delete this Profile" label="Delete" id="delete[$row_cont[ea_profile_id]]" onclick="return confirm('Do you really want to delete this Profile');" image="delete"/>
|
||||
<checkbox id="selected[]" options="$row_cont[ea_profile_id]"/>
|
||||
<description/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="emailadmin.index" template="" lang="" group="0" version="1.7.003">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row disabled="!@subtitle">
|
||||
<hbox align="center" readonly="true">
|
||||
<html align="center" id="subtitle" readonly="true"/>
|
||||
<html id="addJavaScript" readonly="true"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row disabled="!@msg">
|
||||
<description align="center" id="msg" class="redItalic"/>
|
||||
</row>
|
||||
<row>
|
||||
<button align="right" label="Add" id="AddProfile" onclick="window.open(egw::link('/index.php','menuaction=emailadmin.emailadmin_ui.add'),'_blank','dependent=yes,width=850,height=540,scrollbars=yes,status=yes'); return false;"/>
|
||||
</row>
|
||||
<row>
|
||||
<nextmatch id="nm" options="emailadmin.index.rows" span="all"/>
|
||||
</row>
|
||||
<row>
|
||||
<hbox align="right">
|
||||
<button label="Delete" id="delete" onclick="return confirm('Delete Profiles');" image="delete"/>
|
||||
<buttononly onclick="toggle_all(this.form,form::name('nm[rows][selected][]')); return false;" options="arrow_ltr" class="selectAllArrow"/>
|
||||
<description/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<styles>
|
||||
.redItalic { color: red; font-style: italics; }
|
||||
</styles>
|
||||
</template>
|
||||
</overlay>
|
@ -235,6 +235,10 @@ function auth_type_activesync($config)
|
||||
{
|
||||
return _options_from(setup_cmd_config::auth_types(),$config['auth_type_activesync']);
|
||||
}
|
||||
function auth_type_smtp($config)
|
||||
{
|
||||
return _options_from(emailadmin_ui::getSMTPAuthConfig(),$config['smtpAuth']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns options string
|
||||
|
@ -184,7 +184,7 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row_on"">
|
||||
<tr class="row_on">
|
||||
<td>{lang_Mail_server_login_type}:</td>
|
||||
<td>
|
||||
<select name="newsettings[mail_login_type]">{hook_mail_login_type}</select>
|
||||
@ -203,14 +203,18 @@
|
||||
<td><input name="newsettings[smtp_port]" value="{value_smtp_port}"></td>
|
||||
</tr>
|
||||
<tr class="row_on">
|
||||
<td>{lang_SMTP-authentication_required}:</td>
|
||||
<td><select name="newsettings[smtpAuth]"> {hook_auth_type_smtp}</select></td>
|
||||
</tr>
|
||||
<tr class="row_off">
|
||||
<td>{lang_User_for_SMTP-authentication_(leave_it_empty_if_no_auth_required)}:</td>
|
||||
<td><input name="newsettings[smtp_auth_user]" value="{value_smtp_auth_user}"></td>
|
||||
</tr>
|
||||
<tr class="row_off">
|
||||
<tr class="row_on">
|
||||
<td>{lang_Password_for_SMTP-authentication}:</td>
|
||||
<td><input type="password" name="newsettings[smtp_auth_passwd]" value="{value_smtp_auth_passwd}"></td>
|
||||
</tr>
|
||||
<tr class="row_on">
|
||||
<tr class="row_off">
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user