+
+// $body = html_entity_decode(strip_tags(bbcode(stripslashes(nl2br($msg['body'])))),ENT_QUOTES,'UTF-8');
+// $body = strip_tags(bbcode(stripslashes(nl2br($msg['body']))));
+
+ /*if(function_exists('quoted_printable_encode'))
+ $body = quoted_printable_encode($body);
+ else
+ $body = qp($body);*/
+
+ //$msg['body'] = str_replace(array("\\r\\n", "\\r", "\\n"), "<br />", $msg['body']);
+ //$msg['body'] = html_entity_decode(strip_tags(bbcode($msg['body'])));
+ $msg['mimeboundary'] =rand(0,9)."-"
+ .rand(10000000000,9999999999)."-"
+ .rand(10000000000,9999999999)."=:"
+ .rand(10000,99999);
+
+ $msg['notificationfromname'] = t('Administrator');
+ $msg['notificationfromemail'] = t('noreply') . '@' . $a->get_hostname();
+ $msg['headers'] =
+ "From: {$msg['notificationfromname']} <{$msg['notificationfromemail']}>\n" .
+ "Reply-To: {$msg['notificationfromemail']}\n" .
+ "MIME-Version: 1.0\n" .
+ "Content-Type: multipart/alternative; boundary=\"{$msg['mimeboundary']}\"";
+
+
+ $msg['textversion']
+ = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",$msg['body']))),ENT_QUOTES,'UTF-8'));
+ //$TextMessage = html_entity_decode(strip_tags(bbcode(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",$msg['body'])))); ;
+ $msg['htmlversion']
+ = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "<br />\n",$msg['body']))));
+