Revision: 5489
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5489&view=rev
Author:   owes
Date:     2011-02-23 08:26:39 +0000 (Wed, 23 Feb 2011)

Log Message:
-----------
Set from email address to default value if not yet configured.

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-02-23 07:09:33 UTC (rev 5488)
+++ ipcop/trunk/html/cgi-bin/email.cgi  2011-02-23 08:26:39 UTC (rev 5489)
@@ -82,6 +82,13 @@
 # overwrite users input
 unless ($saveerror) {
 
+    # Set default EMAIL_FROM if not configured
+    if (!exists($settings{'EMAIL_FROM'})) {
+        my %mainsettings = ();
+        &General::readhash('/var/ipcop/main/settings', \%mainsettings);
+        $settings{'EMAIL_FROM'} = 
$mainsettings{'HOSTNAME'}."@".$mainsettings{'DOMAINNAME'};
+    }
+
     $cgiparams{'EMAIL_TO'} = $settings{'EMAIL_TO'};
     $cgiparams{'EMAIL_FROM'} = $settings{'EMAIL_FROM'};
     $cgiparams{'EMAIL_USR'} = $settings{'EMAIL_USR'};


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to