Revision 7c7c2ba2
Added by Phil Davis over 10 years ago
usr/local/www/system_advanced_notifications.php | ||
---|---|---|
75 | 75 |
$pconfig['smtpusername'] = $config['notifications']['smtp']['username']; |
76 | 76 |
if ($config['notifications']['smtp']['password']) |
77 | 77 |
$pconfig['smtppassword'] = $config['notifications']['smtp']['password']; |
78 |
if ($config['notifications']['smtp']['authentication_mechanism']) |
|
79 |
$pconfig['smtpauthmech'] = $config['notifications']['smtp']['authentication_mechanism']; |
|
78 | 80 |
if ($config['notifications']['smtp']['fromaddress']) |
79 | 81 |
$pconfig['smtpfromaddress'] = $config['notifications']['smtp']['fromaddress']; |
80 | 82 |
|
... | ... | |
126 | 128 |
$config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress']; |
127 | 129 |
$config['notifications']['smtp']['username'] = $_POST['smtpusername']; |
128 | 130 |
$config['notifications']['smtp']['password'] = $_POST['smtppassword']; |
131 |
$config['notifications']['smtp']['authentication_mechanism'] = $_POST['smtpauthmech']; |
|
129 | 132 |
$config['notifications']['smtp']['fromaddress'] = $_POST['smtpfromaddress']; |
130 | 133 |
|
131 | 134 |
if($_POST['disable_smtp'] == "yes") |
... | ... | |
307 | 310 |
<?=gettext("Enter the e-mail address password for SMTP authentication."); ?> |
308 | 311 |
</td> |
309 | 312 |
</tr> |
313 |
<tr> |
|
314 |
<td width="22%" valign="top" class="vncell"><?=gettext("Notification E-Mail auth mechanism"); ?></td> |
|
315 |
<td width="78%" class="vtable"> |
|
316 |
<select name='smtpauthmech' id='smtpauthmech' class="formselect"> |
|
317 |
<?php |
|
318 |
foreach ($smtp_authentication_mechanisms as $name => $desc): |
|
319 |
$selected = ""; |
|
320 |
if ($pconfig['smtpauthmech'] == $name) |
|
321 |
$selected = "selected=\"selected\""; |
|
322 |
?> |
|
323 |
<option value="<?=$name;?>" <?=$selected;?>><?=$desc;?></option> |
|
324 |
<?php endforeach; ?> |
|
325 |
</select> |
|
326 |
<br /> |
|
327 |
<?=gettext("Select the authentication mechanism used by the SMTP server. Most work with PLAIN, some servers like Exchange or Office365 might require LOGIN."); ?> |
|
328 |
</td> |
|
329 |
</tr> |
|
310 | 330 |
<tr> |
311 | 331 |
<td valign="top" class=""> |
312 | 332 |
|
Also available in: Unified diff
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.