X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=f4fa1f7e6ae4d055188c7dc025d8476a9dc4a5d9;hp=29421f39225739df8e8d4c591273093cbe8535e8;hb=08bcd047b40c7bbb2093fa7ee82f8681f19d960b;hpb=d196b95b5e301f280effe1d94e44aaa560396645 diff --git a/inc/functions.php b/inc/functions.php index 29421f3922..f4fa1f7e6a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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