Index: modules/contact/contact.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v
retrieving revision 1.128
diff -u -p -r1.128 contact.module
--- modules/contact/contact.module	26 Sep 2009 00:13:19 -0000	1.128
+++ modules/contact/contact.module	8 Oct 2009 17:46:56 -0000
@@ -180,7 +180,13 @@ function contact_mail($key, &$message, $
       $message['subject'] .= '[' . variable_get('site_name', 'Drupal') . '] ' . $params['subject'];
       $message['body'][] = "$account->name,";
       $message['body'][] = t("!name (!name-url) has sent you a message via your contact form (!form-url) at !site.", array('!name' => $user->name, '!name-url' => url("user/$user->uid", array('absolute' => TRUE, 'language' => $language)), '!form-url' => url($_GET['q'], array('absolute' => TRUE, 'language' => $language)), '!site' => variable_get('site_name', 'Drupal')), array('langcode' => $language->language));
-      $message['body'][] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", array('absolute' => TRUE, 'language' => $language))), array('langcode' => $language->language));
+      if ($key == 'user_mail' && !user_access('administer users', $user)) {
+        // Only include the opt-out line in the original e-mail and not in the
+        // copy to the sender. Also exclude this if the e-mail was sent from
+        // a user administrator because they can always send e-mails even if
+        // the contacted user has their contact form disabled.
+        $message['body'][] = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => url("user/$account->uid", array('absolute' => TRUE, 'language' => $language))), array('langcode' => $language->language));
+      }
       $message['body'][] = t('Message:', array(), array('langcode' => $language->language));
       $message['body'][] = $params['message'];
       break;
