X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Femail-functions.php;h=1bd2e4e7d74a3cce2e565a3874d4648738c174a9;hb=c006b598f58ffefb61292c2f5abf099fd9675ae5;hp=d854a993ad655baa404b108be27f2450aff5da7c;hpb=596c8ab32594401ca84abfbfe35513ddfff31bec;p=mailer.git diff --git a/inc/email-functions.php b/inc/email-functions.php index d854a993ad..1bd2e4e7d7 100644 --- a/inc/email-functions.php +++ b/inc/email-functions.php @@ -59,7 +59,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = ' // Set webmaster $toEmail = getWebmaster(); } - } elseif ($toEmail == '0') { + } elseif (($toEmail == '0') || (is_null($toEmail))) { // Is the webmaster! $toEmail = getWebmaster(); } @@ -245,7 +245,10 @@ function sendGenericBuildMails ($mode, $tableName, $content, $id, $subjectPart = } // END - if // Is the raw userid set? - if (postRequestElement($userIdColumn[0], $id) > 0) { + if (isValidUserId(postRequestElement($userIdColumn[0], $id))) { + // Set it in content + $content[$userIdColumn[0]] = bigintval(postRequestElement($userIdColumn[0], $id)); + // Load email template if (!empty($subjectPart)) { $mail = loadEmailTemplate('member_' . $mode . '_' . strtolower($subjectPart) . '_' . $tableName[0], $content);