]> git.mxchange.org Git - mailer.git/commitdiff
Old, lost function sendHtmlMail() removed, this is now handled by sendEmail() and...
authorRoland Häder <roland@mxchange.org>
Tue, 17 Aug 2010 06:47:48 +0000 (06:47 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 17 Aug 2010 06:47:48 +0000 (06:47 +0000)
.gitattributes
inc/extensions/ext-bonus.php
inc/functions.php
inc/language/bonus_de.php
inc/libs/html_mail_functions.php
inc/modules/admin/what-send_bonus.php
inc/modules/admin/what-send_newsletter.php
templates/de/emails/html_header.tpl [new file with mode: 0644]

index cf682f6f7317a040249370c9639d5e90cb1f8baa..ebcce7a13b663922ac40c174071819cc22c5c098 100644 (file)
@@ -815,6 +815,7 @@ templates/de/emails/done-member.tpl -text svneol=unset#text/plain
 templates/de/emails/guest/.htaccess -text svneol=unset#text/plain
 templates/de/emails/guest/guest_request_confirm.tpl -text svneol=unset#text/plain
 templates/de/emails/header.tpl -text svneol=unset#text/plain
+templates/de/emails/html_header.tpl svneol=native#text/plain
 templates/de/emails/lock-user.tpl -text svneol=unset#text/plain
 templates/de/emails/lock_sponsor.tpl -text svneol=unset#text/plain
 templates/de/emails/member/.htaccess -text svneol=unset#text/plain
index a88acfd01cf00b0be561aeb3de9513427b40a20f..b1bd99402fe7e0051ab410ee8eb7194936b9271f 100644 (file)
@@ -75,7 +75,7 @@ PRIMARY KEY  (`id`)
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD `bonus_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD INDEX (`bonus_id`)");
 
-               // Run this SQL when html or html_mail extension is installed
+               // Run this SQL when html_mail extension is installed
                if (isExtensionActive('html_mail')) addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` ADD `html_msg` ENUM('Y','N') NOT NULL DEFAULT 'N'");
                break;
 
index 79bb619c29916bc0b9020ec91cb957e9d725d6d4..57431c93293b4da3e2b502bea058e760efa5f936 100644 (file)
@@ -131,13 +131,22 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
 
        // Check for PHPMailer or debug-mode
        if ((!checkPhpMailerUsage()) || (isDebugModeEnabled())) {
+               // Prefix is '' for text mails
+               $prefix = '';
+
+               // Is HTML?
+               if ($isHTML == 'Y') {
+                       // Set prefix
+                       $prefix = 'html_';
+               } // END - if
+
                // Not in PHPMailer-Mode
                if (empty($mailHeader)) {
                        // Load email header template
-                       $mailHeader = loadEmailTemplate('header');
+                       $mailHeader = loadEmailTemplate($prefix . 'header');
                } else {
                        // Append header
-                       $mailHeader .= loadEmailTemplate('header');
+                       $mailHeader .= loadEmailTemplate($prefix . 'header');
                }
        } // END - if
 
@@ -156,9 +165,6 @@ Message : ' . htmlentities(utf8_decode($message)) . '
 
                // This is always fine
                return true;
-       } elseif (($isHtml == 'Y') && (isExtensionActive('html_mail'))) {
-               // Send mail as HTML away
-               return sendHtmlEmail($toEmail, $subject, $message, $mailHeader);
        } elseif (!empty($toEmail)) {
                // Send Mail away
                return sendRawEmail($toEmail, $subject, $message, $mailHeader);
index a002f9ed55f066c2065830bce61d5b7be44a7b96..e19a907e93e9843757940dceb4fd148315b05e3c 100644 (file)
@@ -90,10 +90,10 @@ addMessages(array(
        'ADMIN_SEND_BONUS_NORMAL' => "Text-Mail versenden",
        'ADMIN_SEND_BONUS_HTML' => "HTML-Mail versenden",
        'ADMIN_SEND_BONUS_NORMAL_NOTES' => "Standart Text-Mail an Ihre Mitglieder aussenden.",
-       'ADMIN_SEND_BONUS_HTML_NOTES' => "HTML-Mail an Ihre Mitglieder versenden. Dazu muss die Erweiterung html_mail jedoch installiert sein.",
+       'ADMIN_SEND_BONUS_HTML_NOTES' => "HTML-Mail an Ihre Mitglieder versenden. Dazu muss die Erweiterung <span class=\"data\">html_mail</span> jedoch installiert sein.",
        'ADMIN_BONUS_ORDER_BONUS' => "Bonus f&uuml;r eine Mailbuchung",
        'ADMIN_BONUS_REFERAL_BONUS' => "Bonus f&uuml;r das Werben eines weiteren Mitgliedes",
-       'ADMIN_BONUS_STATS_BONUS' => "Einmalige Bonus bei Erreichen von 100% Klickrate auf eine Mailbuchung (=<div class=\"tiny\">Statistik-Bonus</strong>)",
+       'ADMIN_BONUS_STATS_BONUS' => "Einmalige Bonus bei Erreichen von 100% Klickrate auf eine Mailbuchung (=<span class=\"tiny\">Statistik-Bonus</span>)",
        'ADMIN_BONUS_TURBO_BONUS_TITLE' => "Bonus-{?POINTS?} f&uuml;r best&auml;tigte Mails",
        'ADMIN_BONUS_TURBO_TIMEOUT_TITLE' => "Zeitabst&auml;nde und Aufbewahrungszeiten",
        'ADMIN_BONUS_TURBO_MISC_TITLE' => "Sonstige Einstellungen zur Bonus-Erweiterung",
index 0ca2f48b0402d0357f9cfcb221930476f9afce82..6234dafc6c1534cb07fc9f2b199a0e8a53ff6590 100644 (file)
@@ -40,7 +40,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 //
 function addValidHtmlTags() {
@@ -151,14 +151,5 @@ function insertUrlsIntoHtml ($text) {
        return preCompileCode(str_replace("\n", "<br />\n", $text));
 }
 
-// Sends a HTML mail to the user
-function sendHtmlEmail($to, $subject, $message, $FROM) {
-       if (isExtensionActive('html_mail')) {
-               // Send mail away as HTML
-               $FROM = "Content-Type: text/html; charset=UTF-8\n" . $FROM;
-               sendEmail($to, $subject, $message, 'N', $FROM);
-       } // END - if
-}
-
-//
+// [EOF]
 ?>
index 11735715b8ea78e97ed3d275ddfb0bce867ce9f4..b07579096c5bf8c3d2a346a3a7a50be148a37e2c 100644 (file)
@@ -82,7 +82,7 @@ if (isFormSent()) {
                case 'select': // Selection
                        $template = 'admin_send_bonus_select';
                        break;
-       } // END - if
+       } // END - switch
 
        // Load template
        loadTemplate($template, false, $content);
index 2d9eaef8a6849a218017568102a7574902b902ab..e7b2ca81336527f20f6f05b45703e9d77223d429 100644 (file)
@@ -88,6 +88,8 @@ ORDER BY
 } else {
        // Copy data into constants for the template and load it
        $content['datestamp'] = generateDateTime(time(), 3);
+
+       // Extension html_mail installed?
        if (isExtensionActive('html_mail')) {
                // Load template with HTML mode
                loadTemplate('admin_newsletter', false, $content);
diff --git a/templates/de/emails/html_header.tpl b/templates/de/emails/html_header.tpl
new file mode 100644 (file)
index 0000000..ce27fe5
--- /dev/null
@@ -0,0 +1,8 @@
+MIME-Version: 1.0
+Content-Type: text/html; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+X-Mailer: {?TITLE?} {?FULL_VERSION?}
+Errors-To: {?WEBMASTER?}
+Bounces-To: {?WEBMASTER?}
+X-Loop: {?WEBMASTER?}
+From: "{?MAIN_TITLE?}" <{?WEBMASTER?}>