Index: mailsave.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mailsave/mailsave.module,v
retrieving revision 1.17
diff -u -p -r1.17 mailsave.module
--- mailsave.module	20 Aug 2008 21:50:17 -0000	1.17
+++ mailsave.module	12 Dec 2008 05:07:02 -0000
@@ -304,7 +304,7 @@ function _mailsave_use_mailhandler_attac
   $attachments = array();
 
   // Parse each mime part in turn
-  foreach ($node->mimeparts as $mimepart) {
+  foreach ($node->mimeparts as $key => $mimepart) {
 
     // Only return those parts that have a filename, or are non-text
     // This is try and prevent unnamed text parts getting treated as attachments
@@ -320,6 +320,7 @@ function _mailsave_use_mailhandler_attac
         'filepath' => $filepath,
         'filemime' => strtolower($mimepart->filemime),
         'filesize' => strlen($mimepart->data),
+        'mimepart' => $key,
       );
     }
   }
