diff options
author | Scott Ullrich <sullrich@pfSense.org> | 2009-12-31 18:00:07 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfSense.org> | 2009-12-31 18:00:15 -0500 |
commit | 72306d5a09f96b6ca7ddd4eea757036b5f2c7960 (patch) | |
tree | 73f1bcf36e1609c5da761d8abe94d53216c9c9f7 /etc/inc/notices.inc | |
parent | eb1f8f8ee46f7cdd247604b5c0bedf731333360d (diff) | |
download | pfsense-72306d5a09f96b6ca7ddd4eea757036b5f2c7960.zip pfsense-72306d5a09f96b6ca7ddd4eea757036b5f2c7960.tar.gz |
Adding smtp auth support for notifications. Requested-by: pmi@bluegrass.net
Diffstat (limited to 'etc/inc/notices.inc')
-rw-r--r-- | etc/inc/notices.inc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc index 069b281..278d4f4 100644 --- a/etc/inc/notices.inc +++ b/etc/inc/notices.inc @@ -297,6 +297,17 @@ function notify_via_smtp($message) { $smtp->ssl = 0; $smtp->debug = 0; $smtp->html_debug = 0; + + if($config['notifications']['smtp']['fromaddress']) + $from = $config['notifications']['smtp']['fromaddress']; + + // Use SMTP Auth if fields are filled out + if($config['notifications']['smtp']['username'] && + $config['notifications']['smtp']['password']) { + $smtp->authentication_mechanism = "PLAIN"; + $smtp->username = $config['notifications']['smtp']['username']; + $smtp->password = $config['notifications']['smtp']['password']; + } $headers = array( "From: {$from}", |