diff --git a/README.txt b/README.txt
index 046b8db..5de4b18 100644
--- a/README.txt
+++ b/README.txt
@@ -61,7 +61,7 @@
     'plaintext':
       Plaintext portion of a multipart e-mail (optional).
     'attachments':
-      Array of arrays with the path, name and MIME type of the file (optional).
+      Array of arrays with the path or content, name and MIME type of the file (optional).
     'headers':
       A keyed array with headers (optional). 
 
diff --git a/mimemail.inc b/mimemail.inc
index 9d98f35..bf71668 100644
--- a/mimemail.inc
+++ b/mimemail.inc
@@ -353,10 +353,11 @@ function mimemail_html_body($body, $subject, $plain = FALSE, $plaintext = NULL,
   if (is_array($attachments) && !empty($attachments)) {
     foreach ($attachments as $a) {
       $a = (object) $a;
+      $path = isset($a->uri) ? $a->uri : isset($a->filepath) ? $a->filepath : NULL;
       $content = isset($a->filecontent) ? $a->filecontent : NULL;
       $name = isset($a->filename) ? $a->filename : 'attachment.dat';
       $type = isset($a->filemime) ? $a->filemime : 'application/octet-stream';
-      _mimemail_file($a->uri, $content, $name, $type, 'attachment');
+      _mimemail_file($path, $content, $name, $type, 'attachment');
       $parts = array_merge($parts, _mimemail_file());
     }
   }
diff --git a/mimemail.module b/mimemail.module
index 647a256..13a8738 100644
--- a/mimemail.module
+++ b/mimemail.module
@@ -210,7 +210,7 @@ function mimemail_mail($key, &$message, $params) {
     foreach ($attachment_lines as $key => $attachment_line) {
       $attachment = explode(':', trim($attachment_line), 2);
       $attachments[] = array(
-        'uri' => $attachment[1],
+        'filepath' => $attachment[1],
         'filemime' => $attachment[0],
       );
     }
