Index: trunk/core/kernel/utility/email.php =================================================================== diff -u -r5431 -r6093 --- trunk/core/kernel/utility/email.php (.../email.php) (revision 5431) +++ trunk/core/kernel/utility/email.php (.../email.php) (revision 6093) @@ -136,12 +136,12 @@ $this->Compiled = false; } - + function convertHTMLtoPlain($text) { $search = Array ( "'(<\/td>.*)[\r\n]+(.*)|(<\/p>)|(<\/div>)|(<\/tr>)'i", + "'([\r\n]{0,2})|(<\/p>)|(<\/div>)|(<\/tr>)'i", "'(.*?)'si", "''si", "'(.*?)'si", @@ -182,12 +182,12 @@ ); return strip_tags( preg_replace ($search, $replace, $text) ); } - + function compileBody(){ - + if($this->BodyHtml){ $not_html = $this->convertHTMLtoPlain($this->BodyHtml); - + // $not_html = $this->removeBlankLines($not_html); // Fixing problem with add exclamation characters "!" into the body of the email. $not_html = wordwrap($not_html, 72); @@ -254,7 +254,7 @@ $file_info = array('path'=>$filepath, 'mime'=>$mime); $this->Files[] = $file_info; }else{ - die('File "'.$filepath.'" not exist...'."\n"); + $this->Application->ApplicationDie('File "'.$filepath.'" not exist...'."\n"); } $this->IsMultipart = true; @@ -273,7 +273,7 @@ $content_type .= $this->LF('multipart/alternative; boundary="----='.$this->EmailBoundary.'"'); }else{ $content_type .= $this->LF('text/plain;'); - $content_type .= $this->LF(" ".'charset='.$this->Charset); + $content_type .= $this->LF(" ".'charset='.$this->Charset); } return $content_type;