summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-01-04 22:22:23 +0545
committerRenato Botelho <garga@FreeBSD.org>2015-01-28 13:23:54 -0200
commit7c7c2ba2f0ac0789bbc52af93f715dee10d329af (patch)
treeef7f09e6204511dd39bf42c6a9abfdd11957b4a1
parent27c25d29541707b2546eead19cd9471334fe2eeb (diff)
downloadpfsense-7c7c2ba2f0ac0789bbc52af93f715dee10d329af.zip
pfsense-7c7c2ba2f0ac0789bbc52af93f715dee10d329af.tar.gz
Support for Office365 Mail
https://redmine.pfsense.org/issues/4176 Allow the user to choose SMTP authentication mechanism PLAIN or LOGIN. For existing configs with this option not set, PLAIN is the default, and will appear first in the dropdown box, so next time the user saves the SMTP Notification settings, PLAIN will be the value selected and saved.
-rw-r--r--usr/local/www/system_advanced_notifications.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/usr/local/www/system_advanced_notifications.php b/usr/local/www/system_advanced_notifications.php
index df4d52a..da0c418 100644
--- a/usr/local/www/system_advanced_notifications.php
+++ b/usr/local/www/system_advanced_notifications.php
@@ -75,6 +75,8 @@ if ($config['notifications']['smtp']['username'])
$pconfig['smtpusername'] = $config['notifications']['smtp']['username'];
if ($config['notifications']['smtp']['password'])
$pconfig['smtppassword'] = $config['notifications']['smtp']['password'];
+if ($config['notifications']['smtp']['authentication_mechanism'])
+ $pconfig['smtpauthmech'] = $config['notifications']['smtp']['authentication_mechanism'];
if ($config['notifications']['smtp']['fromaddress'])
$pconfig['smtpfromaddress'] = $config['notifications']['smtp']['fromaddress'];
@@ -126,6 +128,7 @@ if ($_POST) {
$config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress'];
$config['notifications']['smtp']['username'] = $_POST['smtpusername'];
$config['notifications']['smtp']['password'] = $_POST['smtppassword'];
+ $config['notifications']['smtp']['authentication_mechanism'] = $_POST['smtpauthmech'];
$config['notifications']['smtp']['fromaddress'] = $_POST['smtpfromaddress'];
if($_POST['disable_smtp'] == "yes")
@@ -308,6 +311,23 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Notification E-Mail auth mechanism"); ?></td>
+ <td width="78%" class="vtable">
+ <select name='smtpauthmech' id='smtpauthmech' class="formselect">
+ <?php
+ foreach ($smtp_authentication_mechanisms as $name => $desc):
+ $selected = "";
+ if ($pconfig['smtpauthmech'] == $name)
+ $selected = "selected=\"selected\"";
+ ?>
+ <option value="<?=$name;?>" <?=$selected;?>><?=$desc;?></option>
+ <?php endforeach; ?>
+ </select>
+ <br />
+ <?=gettext("Select the authentication mechanism used by the SMTP server. Most work with PLAIN, some servers like Exchange or Office365 might require LOGIN."); ?>
+ </td>
+ </tr>
+ <tr>
<td valign="top" class="">
&nbsp;
</td>
OpenPOWER on IntegriCloud