]> git.mxchange.org Git - mailer.git/blobdiff - inc/email-functions.php
Fixes for various bugs (e.g.: 'secret file could not be read', SQL error and more)
[mailer.git] / inc / email-functions.php
index e477edac1b790c209be0958b073173bfb152071e..3663ca4ce8e49d03d6638666ae0a7aeff02b0a07 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -50,7 +50,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        } // END - if
 
        // Set from header
-       if ((!isInString('@', $toEmail)) && ($toEmail > 0)) {
+       if ((!isInString('@', $toEmail)) && (isValidId($toEmail))) {
                // Does the user exist?
                if ((isExtensionActive('user')) && (fetchUserData($toEmail))) {
                        // Get the email
@@ -81,7 +81,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        } // END - if
 
        // Debug mode enabled?
-       if (isDebugModeEnabled()) {
+       if ((isDebugModeEnabled()) && (!isAjaxOutputMode())) {
                // Init content array
                $content = array(
                        'headers' => htmlentities(trim($mailHeader)),
@@ -227,7 +227,7 @@ function sendGenericBuildMails ($mode, $tableName, $content, $id, $subjectPart =
        } // END - if
 
        // Is the raw userid set?
-       if (isValidUserId(postRequestElement($userIdColumn[0], $id))) {
+       if (isValidId(postRequestElement($userIdColumn[0], $id))) {
                // Set it in content
                $content[$userIdColumn[0]] = bigintval(postRequestElement($userIdColumn[0], $id));