add config parameters for smtp username and password

This commit is contained in:
Uwe Steinmann 2013-09-13 14:54:37 +02:00
parent 070c68fd10
commit 9382c4d1b1
3 changed files with 20 additions and 1 deletions

View File

@ -182,6 +182,10 @@ class Settings { /* {{{ */
var $_smtpPort = null;
// SMTP : send from
var $_smtpSendFrom = null;
// SMTP : user
var $_smtpUser = null;
// SMTP : password
var $_smtpPassword = null;
// LDAP
var $_ldapHost = ""; // URIs are supported, e.g.: ldaps://ldap.host.com
var $_ldapPort = 389; // Optional.
@ -430,6 +434,9 @@ class Settings { /* {{{ */
$this->_smtpSendFrom = strval($tab["smtpSendFrom"]);
else
$this->_smtpSendFrom = ini_get("sendmail_from");
// smtpUser
$this->_smtpUser = strval($tab["smtpUser"]);
$this->_smtpPassword = strval($tab["smtpPassword"]);
}
// XML Path: /configuration/advanced/display
@ -688,6 +695,8 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "smtpServer", $this->_smtpServer);
$this->setXMLAttributValue($node, "smtpPort", $this->_smtpPort);
$this->setXMLAttributValue($node, "smtpSendFrom", $this->_smtpSendFrom);
$this->setXMLAttributValue($node, "smtpUser", $this->_smtpUser);
$this->setXMLAttributValue($node, "smtpPassword", $this->_smtpPassword);
// XML Path: /configuration/advanced/display
$this->getXMLNode($xml, '/configuration', 'advanced');

View File

@ -123,6 +123,8 @@ if ($action == "saveSettings")
$settings->_smtpServer = $_POST["smtpServer"];
$settings->_smtpPort = $_POST["smtpPort"];
$settings->_smtpSendFrom = $_POST["smtpSendFrom"];
$settings->_smtpUser = $_POST["smtpUser"];
$settings->_smtpPassword = $_POST["smtpPassword"];
// SETTINGS -ADVANCED - DISPLAY
$settings->_siteDefaultPage = $_POST["siteDefaultPage"];

View File

@ -372,7 +372,7 @@ if(!is_writeable($settings->_configFilePath)) {
<!--
-- SETTINGS - SYSTEM - SMTP
-->
<tr ><td><b> <?php printMLText("settings_SMTP");?></b></td> </tr>
<tr ><td><b> <?php printMLText("settings_SMTP");?></b></td><td><a class="btn sendtestmail">Send test mail</a></td> </tr>
<tr title="<?php printMLText("settings_smtpServer_desc");?>">
<td><?php printMLText("settings_smtpServer");?>:</td>
<td><input type="text" name="smtpServer" value="<?php echo $settings->_smtpServer ?>" /></td>
@ -385,6 +385,14 @@ if(!is_writeable($settings->_configFilePath)) {
<td><?php printMLText("settings_smtpSendFrom");?>:</td>
<td><input type="text" name="smtpSendFrom" value="<?php echo $settings->_smtpSendFrom ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_smtpUser_desc");?>">
<td><?php printMLText("settings_smtpUser");?>:</td>
<td><input type="text" name="smtpUser" value="<?php echo $settings->_smtpUser ?>" /></td>
</tr>
<tr title="<?php printMLText("settings_smtpPassword_desc");?>">
<td><?php printMLText("settings_smtpPassword");?>:</td>
<td><input type="password" name="smtpPassword" value="<?php echo $settings->_smtpPassword ?>" /></td>
</tr>
</table>
<?php $this->contentContainerEnd(); ?>