]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/newsletter_functions.php
Sanity check added to make sure the file is really there
[mailer.git] / inc / libs / newsletter_functions.php
index e44554ef0367efc048a767bbdf4ea207e5b90744..40a38a8311c14e2504db88b639b289de3d5035df 100644 (file)
@@ -58,7 +58,7 @@ function NL_CHECK_TAGS ($html) {
        $test = stripslashes($html);
        while (ereg("<", $test) && ereg(">", $test)) {
                $check = strtolower(substr($test, strpos($test, "<") + 1, strpos($test, ">") - strpos($test, "<") - 1));
-               $check = str_replace("/", '', $check);
+               $check = str_replace('/', '', $check);
                if (!in_array($check, $GLOBALS['html_tags'])) {
                        // Invalid tag found!
                        return "";
@@ -153,23 +153,23 @@ function NL_INSERT_URLS ($text) {
 }
 
 //
-function SEND_NEWSLETTER ($to, $subject, $message, $MODE) {
+function SEND_NEWSLETTER ($to, $subject, $message, $mode) {
        // Send mail away as HTML
        if (REQUEST_POST('auto_urls') == 'Y') {
                // Automatically insert URLs into newsletter
-               if ((EXT_IS_ACTIVE('html_mail')) && ($MODE == 'html')) {
+               if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) {
                        // Send HTML mail
-                       SEND_EMAIL($to, $subject, HTML_INSERT_URLS($message), "Y");
+                       sendEmail($to, $subject, HTML_INSERT_URLS($message), 'Y');
                } else {
                        // Send normal mail
-                       SEND_EMAIL($to, $subject, NL_INSERT_URLS($message), "N");
+                       sendEmail($to, $subject, NL_INSERT_URLS($message), 'N');
                }
        } else {
                // Regular send-out
-               if ((EXT_IS_ACTIVE('html_mail')) && ($MODE == 'html')) {
-                       SEND_EMAIL($to, $subject, $message, "Y");
+               if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) {
+                       sendEmail($to, $subject, $message, 'Y');
                } else {
-                       SEND_EMAIL($to, $subject, $message, "N");
+                       sendEmail($to, $subject, $message, 'N');
                }
        }
 }