]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
More fixes for points booking and surfbar
[mailer.git] / inc / functions.php
index 29421f39225739df8e8d4c591273093cbe8535e8..f4fa1f7e6ae4d055188c7dc025d8476a9dc4a5d9 100644 (file)
@@ -341,7 +341,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") {
        $SUBJECT = html_entity_decode($SUBJECT);
 
        // Set from header
-       if (!eregi("@", $TO)) {
+       if ((!eregi("@", $TO)) && ($TO > 0)) {
                // Value detected, load email from database
                if (EXT_IS_ACTIVE("msg")) {
                        ADD_MESSAGE_TO_BOX($TO, $SUBJECT, $MSG, $HTML);
@@ -351,6 +351,9 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") {
                        list($TO) = SQL_FETCHROW($result_email);
                        SQL_FREERESULT($result_email);
                }
+       } elseif ($TO == 0) {
+               // Is the webmaster!
+               $TO = WEBMASTER;
        }
 
        // Not in PHPMailer-Mode