]> git.mxchange.org Git - mailer.git/blobdiff - inc/email-functions.php
Used isPostRequestElementSet() instead of comparing postRequestElement() with empty...
[mailer.git] / inc / email-functions.php
index 43cedae31ec08752a2b3822293ea4bd630296379..e477edac1b790c209be0958b073173bfb152071e 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Mailversand bezogene Funktionen                  *
  * -------------------------------------------------------------------- *
- * $Revision:: 2773                                                   $ *
- * $Date:: 2012-06-26 01:02:44 +0200 (Tue, 26 Jun 2012)               $ *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author:: quix0r                                                   $ *
+ * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
@@ -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('<pre>
-<strong>Headers</strong> : ' . htmlentities(trim($mailHeader)) . '
-<strong>To</strong>      : ' . htmlentities($toEmail) . '
-<strong>Subject</strong> : ' . htmlentities($subject) . '
-<strong>Message(' . strlen($message) . ')</strong> : ' . htmlentities($message) . '
-</pre>');
+               // 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;