X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Femail-functions.php;h=e477edac1b790c209be0958b073173bfb152071e;hb=a6aaa866eff075c408f58cc0bc24f08562d51b7c;hp=4a2fc72ba32ef0cdf93c56bed613a99d02a83fce;hpb=1a433d34911d61b7551d9c65069a236620dc227d;p=mailer.git diff --git a/inc/email-functions.php b/inc/email-functions.php index 4a2fc72ba3..e477edac1b 100644 --- a/inc/email-functions.php +++ b/inc/email-functions.php @@ -82,13 +82,17 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = ' // Debug mode enabled? if (isDebugModeEnabled()) { - // In debug mode we want to display the mail instead of sending it away so we can debug this part - outputHtml('
-Headers : ' . htmlentities(trim($mailHeader)) . '
-To      : ' . htmlentities($toEmail) . '
-Subject : ' . htmlentities($subject) . '
-Message(' . strlen($message) . ') : ' . htmlentities($message) . '
-
'); + // Init content array + $content = array( + 'headers' => htmlentities(trim($mailHeader)), + 'to' => htmlentities($toEmail), + 'subject' => htmlentities($subject), + 'message' => htmlentities($message), + 'length' => strlen($message) + ); + + // In debug mode display the mail instead of sending it away so it can be debugged + loadTemplate('display_email', FALSE, $content); // This is always fine return TRUE;