=== modified file 'twisted/mail/smtp.py'
--- twisted/mail/smtp.py	2012-12-30 20:59:55 +0000
+++ twisted/mail/smtp.py	2013-02-03 04:52:11 +0000
@@ -8,6 +8,7 @@
 
 import time, re, base64, types, socket, os, random, rfc822
 import binascii
+import warnings
 from email.base64MIME import encode as encode_base64
 
 from zope.interface import implements, Interface
@@ -984,7 +985,7 @@
 class SMTPClient(basic.LineReceiver, policies.TimeoutMixin):
     """
     SMTP client for sending emails.
-    
+
     After the client has connected to the SMTP server, it repeatedly calls
     L{SMTPClient.getMailFrom}, L{SMTPClient.getMailTo} and
     L{SMTPClient.getMailData} and uses this information to send an email.
@@ -1246,6 +1247,15 @@
         self.context = contextFactory
 
 
+    def __setattr__(self, name, value):
+        if name == "tlsMode":
+            warnings.warn(
+                "tlsMode attribute of twisted.mail.smtp.ESMTPClient "
+                "is deprecated since Twisted 13.0",
+                category=DeprecationWarning, stacklevel=2)
+        self.__dict__[name] = value
+
+
     def esmtpEHLORequired(self, code=-1, resp=None):
         self.sendError(EHLORequiredError(502, "Server does not support ESMTP Authentication", self.log.str()))
 
@@ -1684,7 +1694,7 @@
 
 class SMTPSender(SenderMixin, SMTPClient):
     """
-    SMTP protocol that sends a single email based on information it 
+    SMTP protocol that sends a single email based on information it
     gets from its factory, a L{SMTPSenderFactory}.
     """
 

=== modified file 'twisted/mail/test/test_smtp.py'
--- twisted/mail/test/test_smtp.py	2012-12-30 20:59:55 +0000
+++ twisted/mail/test/test_smtp.py	2013-02-03 06:05:23 +0000
@@ -1611,3 +1611,19 @@
 
         # The client give up
         self.assertEqual("QUIT\r\n", transport.value())
+
+
+    def test_esmtpClientTlsModeDeprecation(self):
+        """
+        L{smtp.ESMTPClient.tlsMode} is deprecated.
+        """
+        self.clientProtocol.tlsMode = False
+        warningsShown = self.flushWarnings(
+            offendingFunctions=[self.test_esmtpClientTlsModeDeprecation])
+        self.assertEqual(len(warningsShown), 1)
+        self.assertIdentical(
+            warningsShown[0]['category'], DeprecationWarning)
+        self.assertEqual(
+            warningsShown[0]['message'],
+            "tlsMode attribute of twisted.mail.smtp.ESMTPClient "
+            "is deprecated since Twisted 13.0")

=== added file 'twisted/mail/topfiles/5852.removal'
--- twisted/mail/topfiles/5852.removal	1970-01-01 00:00:00 +0000
+++ twisted/mail/topfiles/5852.removal	2013-02-03 05:40:10 +0000
@@ -0,0 +1,1 @@
+tlsMode attribute of twisted.mail.smtp.ESMTPClient is deprecated.

