Index: smtp.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/smtp/smtp.module,v
retrieving revision 1.17.2.11
diff -u -p -r1.17.2.11 smtp.module
--- smtp.module	10 Nov 2009 12:13:49 -0000	1.17.2.11
+++ smtp.module	10 Nov 2009 16:51:33 -0000
@@ -55,7 +55,8 @@ function smtp_menu() {
  */
 function smtp_admin_settings() {
   // Override the smtp_library variable.
-  if (module_exists('mimemail')) {
+  if (module_exists('mimemail') &&
+      strpos(variable_get('smtp_library', ''), 'mimemail')) {
     // don't touch smtp_library
   }
   else {
@@ -814,11 +815,14 @@ function _smtp_get_substring($source, $t
   return $substring;
 }  //  End of _smtp_get_substring().
 
-function drupal_mail_wrapper($message) {
-  return smtp_drupal_mail_wrapper($message);
+if (!strpos(variable_get('smtp_library', ''), 'mimemail') &&
+      !function_exists('drupal_mail_wrapper') ) {
+        
+  function drupal_mail_wrapper($message) {
+    return smtp_drupal_mail_wrapper($message);
+  }
 }
 
-
 if (module_exists('mimemail')) {
 /**
  * hook_mailengine for SMTP/MIMEMAIL integration
