diff --git a/mimemail.module b/mimemail.module
index 7b3bb51..3ef1e08 100644
--- a/mimemail.module
+++ b/mimemail.module
@@ -97,6 +97,34 @@ function mimemail_theme() {
  *   )
  * @param $mailkey
  *   An identifier for the message.
+ * @param $send
+ *   Send the message directly.
+ * @return
+ *   An array containing the MIME encoded message, including headers and body.
+ */
+function mimemail($sender, $recipient, $subject, $body, $plaintext = NULL, $headers = array(), $text = NULL, $attachments = array(), $mailkey = '', $send = TRUE) {
+
+  // Prepare the $message array.
+  $engine_prepare_message = variable_get('mimemail_engine', 'mimemail') .'_prepare_message';
+
+  if (function_exists($engine_prepare_message)) {
+    $message = $engine_prepare_message($sender, $recipient, $subject, $body, $plaintext, $headers, $text, $attachments, $mailkey);
+  }
+  else {
+    $message = mimemail_prepare_message($sender, $recipient, $subject, $body, $plaintext, $headers, $text, $attachments, $mailkey);
+  }
+
+  // Optionally send e-mail.
+  if ($send) {
+    $message['result'] = mimemail_mail_send($message);
+  }
+
+  return $message;
+}
+
+/**
+ * The default prepare engine. Same arguments as mimemail() except $send.
+ *
  * @return
  *   An array containing the MIME encoded message, including headers and body.
  */
@@ -156,43 +184,26 @@ function mimemail_prepare_message($sender, $recipient, $subject, $body, $plainte
   return $message;
 }
 
-function mimemail($sender, $recipient, $subject, $body, $plaintext = NULL, $headers = array(), $text = NULL, $attachments = array(), $mailkey = '') {
+/**
+ * Send the message.
+ *
+ * @param $message
+ *   The message array.
+ * @return
+ *   TRUE on success, FALSE on failure.
+ */
+function mimemail_mail_send($message) {
   $engine = variable_get('mimemail_engine', 'mimemail');
   $mailengine = $engine .'_mailengine';
-  $engine_prepare_message = $engine .'_prepare_message';
 
   if (!$engine || !function_exists($mailengine)) {
     return FALSE;
   }
 
-  if (function_exists($engine_prepare_message)) {
-    $message = $engine_prepare_message($sender, $recipient, $subject, $body, $plaintext, $headers, $text, $attachments, $mailkey);
-  }
-  else {
-    $message = mimemail_prepare_message($sender, $recipient, $subject, $body, $plaintext, $headers, $text, $attachments, $mailkey);
-  }
-
   return $mailengine('send', $message);
 }
 
 /**
- * Retreives a list of all available mailer engines.
- *
- * @return
- *   An array of mailer engine names.
- */
-function mimemail_get_engines() {
-  $engines = array();
-  foreach (module_implements('mailengine') as $module) {
-    $function = $module .'_mailengine';
-    if (function_exists($function)) {
-      $engines[$module] = $function('name') .' - '. $function('description');
-    }
-  }
-  return $engines;
-}
-
-/**
  * The default mailengine.
  *
  * @param $op
@@ -247,6 +258,23 @@ function mimemail_mailengine($op, $message = array()) {
 }
 
 /**
+ * Retreives a list of all available mailer engines.
+ *
+ * @return
+ *   An array of mailer engine names.
+ */
+function mimemail_get_engines() {
+  $engines = array();
+  foreach (module_implements('mailengine') as $module) {
+    $function = $module .'_mailengine';
+    if (function_exists($function)) {
+      $engines[$module] = $function('name') .' - '. $function('description');
+    }
+  }
+  return $engines;
+}
+
+/**
  * Overrides Drupal's default mail sending process.
  *
  * @param $mailkey
