diff options
author | Phil Davis <phil.davis@inf.org> | 2015-01-04 22:22:23 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-01-04 22:22:23 +0545 |
commit | 305856e8fb19495e0543e0d74216117aac1d4bd8 (patch) | |
tree | d5fbb752aa6b4eb67ac88bf1d28234a113cf38ab /usr | |
parent | c4249322d922901862719cc2e4c269351ed2c82c (diff) | |
download | pfsense-305856e8fb19495e0543e0d74216117aac1d4bd8.zip pfsense-305856e8fb19495e0543e0d74216117aac1d4bd8.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.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/system_advanced_notifications.php | 20 |
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=""> </td> |