Revision: 5956
http://ipcop.svn.sourceforge.net/ipcop/?rev=5956&view=rev
Author: owes
Date: 2011-10-16 13:10:14 +0000 (Sun, 16 Oct 2011)
Log Message:
-----------
Add sanity checks to better warn against layer 8 error.
Modified Paths:
--------------
ipcop/trunk/html/cgi-bin/email.cgi
Modified: ipcop/trunk/html/cgi-bin/email.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/email.cgi 2011-10-16 11:27:28 UTC (rev 5955)
+++ ipcop/trunk/html/cgi-bin/email.cgi 2011-10-16 13:10:14 UTC (rev 5956)
@@ -99,6 +99,15 @@
} # end unless ($saveerror)
if ($cgiparams{'ACTION'} eq $Lang::tr{'send test mail'}) {
+ if ($settings{'EMAIL_SERVER'} eq '') {
+ $errormessage .= "$Lang::tr{'email server can not be empty'}<br/>";
+ }
+ if ($settings{'EMAIL_TO'} eq '' ) {
+ $errormessage .= "$Lang::tr{'to email bad'}<br/>";
+ }
+ if ($errormessage) {
+ goto ERROR;
+ }
my $template = "/var/ipcop/email/templates/test";
@@ -135,6 +144,7 @@
$errormessage = "$Lang::tr{'test email could not be sent'}:<br/>";
$errormessage .= "$return <br />";
}
+ERROR:
} # end if ($cgiparams{'ACTION'} eq $Lang::tr{'send test mail'})
&Header::openpage($Lang::tr{'email settings'}, 1, '');
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn