]> git.mxchange.org Git - ctracker.git/blobdiff - libs/lib_detector.php
Some nice improvements:
[ctracker.git] / libs / lib_detector.php
index eb9ed1d8ad3e15cc9f7b3a5cc07a5a9e78416694..60c9f85dab9ce250d33be2e3e77ad688abe4c10f 100644 (file)
@@ -144,9 +144,12 @@ function crackerTrackerSendMail ($mail) {
 
                        // All fine
                        return true;
-               } else {
+               } elseif (isset($GLOBALS['ctracker_email'])) {
                        // Send it
-                       return mail(constant('__CTRACKER_EMAIL'), 'CTracker: Attack detected!', $mail, 'From: ctracker@mxchange.org');
+                       return mail($GLOBALS['ctracker_email'], 'CTracker: Attack detected!', $mail, $GLOBALS['ctracker_header']);
+               } else {
+                       // Send it the deprecated way with constant
+                       return mail(constant('__CTRACKER_EMAIL'), 'CTracker: Attack detected!', $mail, $GLOBALS['ctracker_header']);
                }
        } // END - if
 }