Index: mimemail.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/mimemail/mimemail.inc,v
retrieving revision 1.40
diff -u -r1.40 mimemail.inc
--- mimemail.inc	23 Feb 2009 16:11:19 -0000	1.40
+++ mimemail.inc	15 Mar 2010 15:03:59 -0000
@@ -117,9 +117,17 @@
     if (strpos($url, '://') || preg_match('!mailto:!', $url)) {
       return $url;
     }
-    else {
     // The $url is a relative file path, continue processing.
-      $file = $url;
+    else {
+    	// Check if download method is set to private,
+    	// and the url needs conversion.
+      if (variable_get('file_downloads', '') == FILE_DOWNLOADS_PRIVATE && strpos($url, 'system/files/') !== FALSE ) { 
+      	$file = file_create_path(substr($url, (strpos($url, 'system/files/') + strlen('system/files/'))));
+      }
+      // Download method is public
+      else { 
+        $file = $url;
+      }
     }
   }
 
