]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-send_newsletter.php
Mailer project continued:
[mailer.git] / inc / modules / admin / what-send_newsletter.php
index 84a57f414404c7c09c239dabb2fe70ffff795ee6..9661bdcd0ee7188d7888ac1e188b3d32c5e57547 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -45,11 +45,13 @@ addYouAreHereLink('admin', __FILE__);
 
 if (isFormSent()) {
        $result = SQL_QUERY("SELECT
-       `userid`,`email`
+       `userid`,
+       `email`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
-       `status`='CONFIRMED' AND `nl_receive`='Y'
+       `status`='CONFIRMED' AND
+       `nl_receive`='Y'
 ORDER BY
        `userid` ASC", __FILE__, __LINE__);
        if (!SQL_HASZERONUMS($result)) {
@@ -59,10 +61,10 @@ ORDER BY
                        $template = 'newsletter';
 
                        // Check for extension and sending-mode
-                       if (!isExtensionActive('html_mail', true) && (postRequestElement('mode') == 'html')) {
+                       if (!isExtensionActive('html_mail', true) && (postRequestElement('mail_mode') == 'html')) {
                                // Set mode to text mode
-                               postRequestElement('mode') == 'text';
-                       } elseif (postRequestElement('mode') == 'html') {
+                               postRequestElement('mail_mode') == 'text';
+                       } elseif (postRequestElement('mail_mode') == 'html') {
                                // Set HTML templates
                                $template = 'newsletter_html';
                        }
@@ -74,7 +76,7 @@ ORDER BY
                        $message = loadEmailTemplate($template, array('text' => postRequestElement('text')), $content['userid']);
 
                        // ... and send it away!
-                       sendNewsletter($content['email'], postRequestElement('subject'), $message, postRequestElement('mode'));
+                       sendNewsletter($content['email'], postRequestElement('subject'), $message, postRequestElement('mail_mode'));
                } // END - while
 
                // Output message