### Eclipse Workspace Patch 1.0
#P mimemail
Index: theme/mimemail.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mimemail/theme/mimemail.theme.inc,v
retrieving revision 1.6
diff -u -r1.6 mimemail.theme.inc
--- theme/mimemail.theme.inc	12 Aug 2010 10:38:02 -0000	1.6
+++ theme/mimemail.theme.inc	21 Aug 2010 09:58:05 -0000
@@ -28,14 +28,21 @@
   $mailstyle = drupal_get_path('theme', $theme) .'/mail.css';
 
   // Check for the existence of a mail.css file in the current theme folder
-  if (@file_exists($mailstyle)) {
+  if (@file_exists($mailstyles)) {
     $styles = $mailstyle;
   }
   // If no mail.css was found, gather all style sheets
   // and embed a version of all style definitions
   else {
+    $css_all = drupal_add_css();
+    $css_list = array();
+    foreach ($css_all as $media => $types) {
+      if ($media == 'all' || $media == 'screen') {
+        $css_list[$media] = $types;
+      }
+    }
     $styles = preg_replace('|<link.*href="'. base_path()
-                          .'([^"?]*)[?"].*|', '\1', drupal_get_css());
+                          .'([^"?]*)[?"].*|', '\1', drupal_get_css($css_list));
   }
 
   // Process each style sheet
