Funktion send_mail() global verfügbar gemacht.
Bernd Wurst

Bernd Wurst commited on 2019-10-15 09:51:58
Zeige 2 geänderte Dateien mit 10 Einfügungen und 10 Löschungen.

... ...
@@ -473,6 +473,16 @@ function get_modules_info()
473 473
     return $modconfig;
474 474
 }
475 475
 
476
+
477
+function send_mail($address, $subject, $body)
478
+{
479
+    if (strstr($subject, "\n") !== false) {
480
+        die("Zeilenumbruch im subject!");
481
+    }
482
+    $header = "From: ".config('company_name')." Web Administration <noreply@".config('masterdomain').">\r\nReply-To: ".config('adminmail')."\r\nCc: ".config('adminmail')."\r\nContent-Type: text/plain; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 8bit";
483
+    mail($address, $subject, $body, $header);
484
+}
485
+
476 486
 function handle_exception($e)
477 487
 {
478 488
     if (config('enable_debug')) {
... ...
@@ -74,13 +74,3 @@ Gültigkeit.
74 74
     send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg);
75 75
 }
76 76
 
77
-
78
-
79
-function send_mail($address, $subject, $body)
80
-{
81
-    if (strstr($subject, "\n") !== false) {
82
-        die("Zeilenumbruch im subject!");
83
-    }
84
-    $header = "From: ".config('company_name')." Web Administration <noreply@".config('masterdomain').">\r\nReply-To: ".config('adminmail')."\r\nCc: ".config('adminmail')."\r\nContent-Type: text/plain; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 8bit";
85
-    mail($address, $subject, $body, $header);
86
-}
87 77