Index: mimemail.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mimemail/mimemail.inc,v
retrieving revision 1.57
diff -u -r1.57 mimemail.inc
--- mimemail.inc	21 Jan 2011 19:54:54 -0000	1.57
+++ mimemail.inc	19 Feb 2011 01:59:38 -0000
@@ -107,7 +107,7 @@
 /**
  * Helper function to extract local files
  *
- * @param $url a URL to a file
+ * @param $url a URI or an absolute URL to a file
  *
  * @return an absolute :
  */
@@ -123,12 +123,13 @@
     else {
       $url = _mimemail_url($url, 'TRUE');
       // The $url is absolute, we're done here.
-      if (strpos($url, '://') !== FALSE || preg_match('!mailto:!', $url)) {
+      $scheme = file_uri_scheme($url);
+      if ($scheme == 'http' || $scheme == 'https' || preg_match('!mailto:!', $url)) {
         return $url;
       }
-      // The $url is a relative file path, continue processing.
+      // The $url is a non-local URI that needs to be converted to a URL.
       else {
-        $file = drupal_realpath($url);
+        $file = file_create_url($url);
       }
     }
   }
@@ -343,7 +344,7 @@
     $a = (object) $a;
     $name = isset($a->filename) ? $a->filename : '';
     $type = isset($a->filemime) ? $a->filemime : '';
-    _mimemail_file($a->filepath, $name, $type, 'attachment');
+    _mimemail_file($a->uri, $name, $type, 'attachment');
     $parts = array_merge($parts, _mimemail_file());
   }
 
