diff --git a/smtp.module b/smtp.module
index a97b6f4..32df158 100644
--- a/smtp.module
+++ b/smtp.module
@@ -754,6 +754,24 @@ function smtp_drupal_mail_wrapper($message) {
       break;
   }
 
+  // Process inline images.
+  if (!empty($message['images'])) {
+    foreach ($message['images'] as $image) {
+      if (!empty($image['filepath']) && !empty($image['cid'])) {
+        if (file_exists($image['filepath'])) {
+          $image_extension = pathinfo($image['filepath'], PATHINFO_EXTENSION);
+          $image_mime_type = PHPMailer::_mime_types($image_extension);
+          if (empty($image['name'])) {
+            $image_name = pathinfo($image['filepath'], PATHINFO_FILENAME);
+          }
+          else {
+            $image_name = $image['name'];
+          }
+          $mail->AddEmbeddedImage($image['filepath'], $image['cid'], $image_name, 'base64', $image_mime_type);
+        }
+      }
+    }
+  }
 
   // Set the authentication settings.
   $username = variable_get('smtp_username', '');
