diff --git a/smtp.admin.inc b/smtp.admin.inc
index 9d556f7..1803dca 100644
--- a/smtp.admin.inc
+++ b/smtp.admin.inc
@@ -11,28 +11,12 @@
  *   An array containing form items to place on the module settings page.
  */
 function smtp_admin_settings() {
-  // Override the smtp_library variable.
-  if (module_exists('mimemail') &&
-      strpos(variable_get('smtp_library', ''), 'mimemail')) {
-    // don't touch smtp_library
+  if (variable_get('smtp_on', 0)) {
+    drupal_set_message(t('SMTP.module is active.'));
   }
+  // If this module is turned off, delete the variable.
   else {
-    if (variable_get('smtp_on', 0)) {
-      $smtp_path = drupal_get_filename('module', 'smtp');
-      if ($smtp_path) {
-        variable_set('smtp_library', $smtp_path);
-        drupal_set_message(t('SMTP.module is active.'));
-      }
-      // If drupal can't find the path to the module, display an error.
-      else {
-        drupal_set_message(t("SMTP.module error: Can't find file."), 'error');
-      }
-    }
-    // If this module is turned off, delete the variable.
-    else {
-      variable_del('smtp_library');
-      drupal_set_message(t('SMTP.module is INACTIVE.'));
-    }
+    drupal_set_message(t('SMTP.module is INACTIVE.'));
   }
 
   $form['onoff'] = array(
diff --git a/smtp.install b/smtp.install
index 2a68650..aaedc3c 100644
--- a/smtp.install
+++ b/smtp.install
@@ -30,10 +30,7 @@ function smtp_uninstall() {
   variable_del('smtp_protocol');
   variable_del('smtp_test_address');
   variable_del('smtp_username');
-
-  if (variable_get('smtp_library', '') == drupal_get_path('module', 'smtp') . '/smtp.module') {
-    variable_del('smtp_library');
-  }
+  variable_del('smtp_library');
 }  //  End of contact_attach_uninstall().
 
 function smtp_enable() {
@@ -52,4 +49,6 @@ function smtp_update_7000() {
   if (variable_get('smtp_on', 0) != 0) {
     variable_set('mail_system', array('default-system' => 'SmtpMailSystem'));
   }
+  // Not used any more in D7.
+  variable_del('smtp_library');
 }
