Skip to content
Snippets Groups Projects
Commit d88165c8 authored by filip's avatar filip
Browse files

Added admin_name and admin_email to mail system config tab.

Using these variables in welcome email from admin, when mailbox is created.
parent c7d6d962
No related branches found
No related tags found
No related merge requests found
...@@ -180,6 +180,22 @@ $form["tabs"]['mail'] = array ( ...@@ -180,6 +180,22 @@ $form["tabs"]['mail'] = array (
'width' => '30', 'width' => '30',
'maxlength' => '255' 'maxlength' => '255'
), ),
'admin_mail' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'admin_name' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
################################## ##################################
# ENDE Datatable fields # ENDE Datatable fields
################################## ##################################
...@@ -233,4 +249,4 @@ $form["tabs"]['misc'] = array ( ...@@ -233,4 +249,4 @@ $form["tabs"]['misc'] = array (
); );
?> ?>
\ No newline at end of file
...@@ -19,4 +19,6 @@ $wb['use_domain_module_txt'] = 'Use the domain-module to add new domains'; ...@@ -19,4 +19,6 @@ $wb['use_domain_module_txt'] = 'Use the domain-module to add new domains';
$wb['use_domain_module_hint'] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They can not free edit the domain-field.You have to re-login after changing this value, to make the changes visible.'; $wb['use_domain_module_hint'] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They can not free edit the domain-field.You have to re-login after changing this value, to make the changes visible.';
$wb['new_domain_txt'] = 'HTML to create a new domain'; $wb['new_domain_txt'] = 'HTML to create a new domain';
$wb['webftp_url_txt'] = 'WebFTP URL'; $wb['webftp_url_txt'] = 'WebFTP URL';
$wb['admin_mail_txt'] = 'E-mail Administrátora';
$wb['admin_name_txt'] = 'Jméno Administrátora';
?> ?>
...@@ -19,4 +19,6 @@ $wb["use_domain_module_txt"] = 'Use the domain-module to add new domains'; ...@@ -19,4 +19,6 @@ $wb["use_domain_module_txt"] = 'Use the domain-module to add new domains';
$wb["use_domain_module_hint"] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They cannot free edit the domain-field.You have to re-login after changing this value, to make the changes visible.'; $wb["use_domain_module_hint"] = 'If you use this module, your customers can only select one of the domains the admin creates for them. They cannot free edit the domain-field.You have to re-login after changing this value, to make the changes visible.';
$wb["new_domain_txt"] = 'HTML to create a new domain'; $wb["new_domain_txt"] = 'HTML to create a new domain';
$wb["webftp_url_txt"] = 'WebFTP URL'; $wb["webftp_url_txt"] = 'WebFTP URL';
$wb['admin_mail_txt'] = 'Administrator's e-mail';
$wb['admin_name_txt'] = 'Administrator's name';
?> ?>
...@@ -15,6 +15,14 @@ ...@@ -15,6 +15,14 @@
<label for="webmail_url">{tmpl_var name='webmail_url_txt'}</label> <label for="webmail_url">{tmpl_var name='webmail_url_txt'}</label>
<input name="webmail_url" id="webmail_url" value="{tmpl_var name='webmail_url'}" size="30" maxlength="255" type="text" class="textInput" /> <input name="webmail_url" id="webmail_url" value="{tmpl_var name='webmail_url'}" size="30" maxlength="255" type="text" class="textInput" />
</div> </div>
<div class="ctrlHolder">
<label for="admin_mail">{tmpl_var name='admin_mail_txt'}</label>
<input name="admin_mail" id="admin_mail" value="{tmpl_var name='admin_mail'}" size="30" maxlength="255" type="text" class="textInput" />
</div>
<div class="ctrlHolder">
<label for="admin_name">{tmpl_var name='admin_name_txt'}</label>
<input name="admin_name" id="admin_name" value="{tmpl_var name='admin_name'}" size="30" maxlength="255" type="text" class="textInput" />
</div>
</fieldset> </fieldset>
<input type="hidden" name="id" value="{tmpl_var name='id'}"> <input type="hidden" name="id" value="{tmpl_var name='id'}">
......
...@@ -242,6 +242,12 @@ class page_action extends tform_actions { ...@@ -242,6 +242,12 @@ class page_action extends tform_actions {
$welcomeFromName = $app->tform->lng("welcome_mail_fromname_txt"); $welcomeFromName = $app->tform->lng("welcome_mail_fromname_txt");
$welcomeFromEmail = $app->tform->lng("welcome_mail_fromemail_txt"); $welcomeFromEmail = $app->tform->lng("welcome_mail_fromemail_txt");
$app->uses('getconf');
$global_config = $app->getconf->get_global_config('mail');
if(!empty($global_config['admin_mail']))$welcomeFromEmail = $global_config['admin_mail'];
if(!empty($global_config['admin_name']))$welcomeFromName = $global_config['admin_name'];
$mailHeaders = "MIME-Version: 1.0" . "\n"; $mailHeaders = "MIME-Version: 1.0" . "\n";
$mailHeaders .= "Content-type: text/plain; charset=utf-8" . "\n"; $mailHeaders .= "Content-type: text/plain; charset=utf-8" . "\n";
$mailHeaders .= "Content-Transfer-Encoding: 8bit" . "\n"; $mailHeaders .= "Content-Transfer-Encoding: 8bit" . "\n";
......
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