36 |
36 |
|
37 |
37 |
require("guiconfig.inc");
|
38 |
38 |
|
|
39 |
// Growl
|
39 |
40 |
if($config['notifications']['growl']['password'])
|
40 |
41 |
$pconfig['password'] = $config['notifications']['growl']['password'];
|
41 |
42 |
if($config['notifications']['growl']['ipaddress'])
|
42 |
43 |
$pconfig['ipaddress'] = $config['notifications']['growl']['ipaddress'];
|
43 |
44 |
|
|
45 |
// SMTP
|
|
46 |
if($config['notifications']['smtp']['username'])
|
|
47 |
$pconfig['smtpusername'] = $config['notifications']['smtp']['username'];
|
|
48 |
if($config['notifications']['smtp']['password'])
|
|
49 |
$pconfig['smtppassword'] = $config['notifications']['smtp']['password'];
|
|
50 |
if($config['notifications']['smtp']['notifyemailaddress'])
|
|
51 |
$pconfig['smtpnotifyemailaddress'] = $config['notifications']['smtp']['notifyemailaddress'];
|
|
52 |
|
44 |
53 |
if ($_POST) {
|
45 |
54 |
|
46 |
55 |
unset($input_errors);
|
... | ... | |
61 |
70 |
if ($_POST['Submit'] == "Save") {
|
62 |
71 |
$tunableent = array();
|
63 |
72 |
|
|
73 |
// Growl
|
64 |
74 |
$config['notifications']['growl']['ipaddress'] = $_POST['ipaddress'];
|
65 |
75 |
$config['notifications']['growl']['password'] = $_POST['password'];
|
66 |
76 |
|
|
77 |
// SMTP
|
|
78 |
$config['notifications']['smtp']['ipaddress'] = $_POST['smtpipaddress'];
|
|
79 |
$config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress'];
|
|
80 |
|
67 |
81 |
write_config();
|
68 |
82 |
|
|
83 |
// Send test message via growl
|
69 |
84 |
register_via_growl();
|
70 |
85 |
notify_via_growl("This is a test message form pfSense. It is safe to ignore this message.");
|
71 |
|
|
|
86 |
|
|
87 |
// Send test message via smtp
|
|
88 |
notify_via_smtp("This is a test message form pfSense. It is safe to ignore this message.");
|
|
89 |
|
72 |
90 |
pfSenseHeader("system_advanced_notifications.php");
|
73 |
91 |
exit;
|
74 |
92 |
}
|
... | ... | |
111 |
129 |
<div class="tabcont">
|
112 |
130 |
<form action="system_advanced_notifications.php" method="post" name="iform">
|
113 |
131 |
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
|
132 |
<!-- GROWL -->
|
114 |
133 |
<tr>
|
115 |
134 |
<td colspan="2" valign="top" class="listtopic">Growl</td>
|
116 |
135 |
</tr>
|
... | ... | |
128 |
147 |
Enter the password of the remote growl notification device.
|
129 |
148 |
</td>
|
130 |
149 |
</tr>
|
|
150 |
<!-- SMTP -->
|
|
151 |
<tr>
|
|
152 |
<td colspan="2" valign="top" class="listtopic">SMTP E-Mail</td>
|
|
153 |
</tr>
|
|
154 |
<tr>
|
|
155 |
<td width="22%" valign="top" class="vncell">IP Address of E-Mail server</td>
|
|
156 |
<td width="78%" class="vtable">
|
|
157 |
<input name='smtpipaddress' value='<?php echo $pconfig['smtpipaddress']; ?>'><br/>
|
|
158 |
This is the IP address that you would like to send growl notifications to.
|
|
159 |
</td>
|
|
160 |
</tr>
|
|
161 |
<tr>
|
|
162 |
<td width="22%" valign="top" class="vncell">Notification E-Mail address</td>
|
|
163 |
<td width="78%" class="vtable">
|
|
164 |
<input name='smtpnotifyemailaddress' type='input' value='<?php echo $pconfig['smtpnotifyemailaddress']; ?>'><br/>
|
|
165 |
Enter the e-mail address that you would like email notifications sent to.
|
|
166 |
</td>
|
|
167 |
</tr>
|
131 |
168 |
<tr>
|
132 |
169 |
<td valign="top" class="">
|
133 |
170 |
|
Adding SMTP support. Ticket #59