[LON-CAPA-cvs] cvs: loncom(version_1_2_X) /interface lonsupportreq.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 22 Sep 2004 19:13:41 -0000


albertel		Wed Sep 22 15:13:41 2004 EDT

  Modified files:              (Branch: version_1_2_X)
    /loncom/interface	lonsupportreq.pm 
  Log:
   bacport 1.9
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.5 loncom/interface/lonsupportreq.pm:1.5.2.1
--- loncom/interface/lonsupportreq.pm:1.5	Tue Jul 13 13:35:58 2004
+++ loncom/interface/lonsupportreq.pm	Wed Sep 22 15:13:41 2004
@@ -535,16 +535,27 @@
  <h3>A support request has been sent to $to</h3>
 END
     } else { 
-        $to = 'helpdesk@lon-capa.org';
-        $r->print(<<END);
+        $to = $admin;
+	if ($to =~ m/^[^\@]+\@[^\@]+$/) {
+	    $r->print(<<END);
+<html>
+<head>
+ <title>LON-CAPA support request recorded</title>
+</head>
+$bodytag
+ <h3>A support request has been sent to $to</h3>
+END
+        } else {
+	    $r->print(<<END);
 <html>
 <head>
  <title>LON-CAPA support request recorded</title>
 </head>
 $bodytag
  <h3>Warning: Problem with support e-mail address</h3>
-As the e-mail address provided for this LON-CAPA server ($to) does not appear to be a valid e-mail address, your support request has <b>not</b> been sent to the LON-CAPA support staff at your institution. Instead a copy has been sent to the LON-CAPA support team at Michigan State University. 
+As the e-mail address provided for this LON-CAPA server ($to) does not appear to be a valid e-mail address, your support request has <b>not</b> been sent to the LON-CAPA support staff or administrator at your institution. Instead a copy has been sent to the LON-CAPA support team at Michigan State University. 
 END
+            $to = 'helpdesk@lon-capa.org';
     }
     if (defined($ENV{'form.email'})) {
         if ($ENV{'form.email'} =~ m/^[^\@]+\@[^\@]+$/) {