--- includes/mail.inc	2008-10-06 06:04:08.000000000 -0500
+++ includes/mailNEW.inc	2009-01-28 13:25:41.528921900 -0600
@@ -248,7 +248,7 @@ function drupal_wrap_mail($text, $indent
  *
  * This function provides suitable alternatives for the following tags:
  * <a> <em> <i> <strong> <b> <br> <p> <blockquote> <ul> <ol> <li> <dl> <dt>
- * <dd> <h1> <h2> <h3> <h4> <h5> <h6> <hr>
+ * <dd> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <tr> <td> <th>
  *
  * @param $string
  *   The string to be transformed.
@@ -262,7 +262,7 @@ function drupal_html_to_text($string, $a
   // Cache list of supported tags.
   static $supported_tags;
   if (empty($supported_tags)) {
-    $supported_tags = array('a', 'em', 'i', 'strong', 'b', 'br', 'p', 'blockquote', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr');
+    $supported_tags = array('a', 'em', 'i', 'strong', 'b', 'br', 'p', 'blockquote', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'tr', 'td', 'th');
   }
 
   // Make sure only supported tags are kept.
@@ -305,6 +305,7 @@ function drupal_html_to_text($string, $a
 
     // Process HTML tags (but don't output any literally).
     if ($tag) {
+      $end_char = "\n"; // By default append \n to end of element
       list($tagname) = explode(' ', strtolower($value), 2);
       switch ($tagname) {
         // List counters
@@ -386,6 +387,18 @@ function drupal_html_to_text($string, $a
         case '/dl':
           $chunk = ''; // Ensure blank new-line.
           break;
+        case '/tr':
+          $chunk = '|'; // Append pipe and trigger line feed
+          break;
+        case 'td':
+        case 'th':
+          $end_char = ''; // Suppress linefeed character for the next element
+          $output .= '|';
+          break;
+        case '/td':
+        case '/th':
+          $output .= "\t";
+          break;
       }
     }
     // Process blocks of text.
@@ -404,7 +417,7 @@ function drupal_html_to_text($string, $a
         $chunk = $casing($chunk);
       }
       // Format it and apply the current indentation.
-      $output .= drupal_wrap_mail($chunk, implode('', $indent)) ."\n";
+      $output .= drupal_wrap_mail($chunk, implode('', $indent)) . $end_char;
       // Remove non-quotation markers from indentation.
       $indent = array_map('_drupal_html_to_text_clean', $indent);
     }
