Thanks a lot. I have made a small variation on this fix and committed it to SVN:
- Code: Select all
Index: email.php
===================================================================
--- email.php (revision 3072)
+++ email.php (revision 3073)
@@ -313,9 +313,9 @@
$id = MIME::unique();
// set text/plain version of message
- $text = MIME::message(htmlspecialchars_decode(strip_tags(preg_replace(array('/<br[^>]*>/i','/<div[^>]*>/i','/<p[^>]*>/i', '/<table[^>]*>/i'), array("\r\n","\r\n","\r\n","\r\n"),$content))), 'text/plain', null, MIME::HCHARSET);
+ $text = MIME::message(htmlspecialchars_decode(strip_tags(preg_replace(array('/<br[^>]*>/i','/<div[^>]*>/i','/<p[^>]*>/i', '/<table[^>]*>/i'), array("\r\n","\r\n","\r\n","\r\n"),$content))), 'text/plain', $app->_conf['oe'], MIME::HCHARSET);
// set text/html version of message
- $html = MIME::message($html_content, 'text/html', null, MIME::HCHARSET);
+ $html = MIME::message($html_content, 'text/html', $app->_conf['oe'], MIME::HCHARSET);
// add attachment with name 'file.txt'
//$at[] = MIME::message('source file', 'text/plain', 'file.txt', 'ISO-8859-1', 'base64', 'attachment');
//$file = 'xpertmailer.gif';
In this case I'm using the encoding of the application (iso-8859-1 if monolingual english, utf-8 otherwise) rather than hardcoding it.
-Steve