Fixed small bug in mail class, added text/hmtl mime type.
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Mon, 12 Nov 2012 08:39:44 +0000 (09:39 +0100)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Mon, 12 Nov 2012 08:39:44 +0000 (09:39 +0100)
includes/ui/view_package.php
reporting/includes/class.mail.inc

index 9e68d046dbf1ef7800a6015cd42c6c7cfd9cdbe5..dee8a2f9945df7fe4fb03248e100c0ee426f141e 100644 (file)
@@ -1,4 +1,14 @@
 <?php
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
 $page_security = 'SA_OPEN';
 $path_to_root = "../..";
 include_once($path_to_root . "/includes/session.inc");
index 778815534f01e83144c488434b8af765e21832a0..65066ca75fa8eb75ca4cbad1d3f6eaacc145f68e 100644 (file)
@@ -75,7 +75,7 @@ class email
     {
         $this->body = "--$this->boundary\n";
            $this->body .= "Content-Type: text/plain; charset=\"{$this->charset}\"\n";
-           $this->body .= "Content-Transfer-Encoding: 8bit\n";
+           $this->body .= "Content-Transfer-Encoding: 8bit\n\n";
            $this->body .= $text."\n";
     }
 
@@ -83,7 +83,7 @@ class email
     {
         $this->body = "--$this->boundary\n";
            $this->body .= "Content-Type: text/html; charset=\"{$this->charset}\"\n";
-           $this->body .= "Content-Transfer-Encoding: quoted-printable\n";
+           $this->body .= "Content-Transfer-Encoding: quoted-printable\n\n";
            $this->body .= "<html><body>\n".$html."\n</body></html>\n";
     }
 
@@ -103,6 +103,8 @@ class email
                if ($filename == $file . '.tgz') return 'application/x-tar-gz';
                $file = basename($filename, '.gz');
                if ($filename == $file . '.gz') return 'application/x-gzip';
+               $file = basename($filename, '.html');
+               if ($filename == $file . '.html') return 'text/html';
                return 'application/unknown';
        }