Index: twisted/mail/topfiles/5852.removal
===================================================================
--- twisted/mail/topfiles/5852.removal	(revision 0)
+++ twisted/mail/topfiles/5852.removal	(revision 0)
@@ -0,0 +1 @@
+tlsMode attribute of twisted.mail.smtp.ESMTPClient is deprecated.
Index: twisted/mail/smtp.py
===================================================================
--- twisted/mail/smtp.py	(revision 35499)
+++ twisted/mail/smtp.py	(working copy)
@@ -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
@@ -158,6 +159,7 @@
         return '\n'.join(res)
 
 
+
 class ESMTPClientError(SMTPClientError):
     """Base class for ESMTP client errors.
     """
@@ -1009,6 +1011,7 @@
         self.code = -1
         self.log = util.LineLog(logsize)
 
+
     def sendLine(self, line):
         # Log sendLine only if you are in debug mode for performance
         if self.debug:
@@ -1244,9 +1247,14 @@
         self.authenticators = []
         self.secret = secret
         self.context = contextFactory
-        self.tlsMode = False
 
 
+    def __setattr__(self, name, value):
+        if name == "tlsMode":
+            warnings.warn("tlsMode attribute of twisted.mail.smtp.ESMTPClient is deprecated since Twisted 12.2", 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()))
 
Index: twisted/mail/test/test_smtp.py
===================================================================
--- twisted/mail/test/test_smtp.py	(revision 35499)
+++ twisted/mail/test/test_smtp.py	(working copy)
@@ -6,11 +6,13 @@
 """
 
 from zope.interface import implements
+import warnings
 
 from twisted.python.util import LineLog
 from twisted.trial import unittest, util
 from twisted.protocols import basic, loopback
 from twisted.mail import smtp
+from twisted.mail.smtp import ESMTPClient
 from twisted.internet import defer, protocol, reactor, interfaces
 from twisted.internet import address, error, task
 from twisted.test.proto_helpers import StringTransport
@@ -609,7 +611,7 @@
     def test_loginAuth(self):
         """
         L{ESMTPClient} can authenticate using the I{LOGIN} SASL mechanism.
-
+        
         @see: U{http://sepp.oetiker.ch/sasl-2.1.19-ds/draft-murchison-sasl-login-00.txt}
         """
         realm = DummyRealm()
@@ -1518,3 +1520,23 @@
         client.sentMail(199, "Test response", 1, addresses, client.log)
 
         return onDone
+
+
+
+class DeprecationTests(unittest.TestCase):
+    """
+    Test for deprecations.
+    """
+
+    def test_esmtpClientTlsModeDeprecation(self):
+        """
+        Test deprecation of ESMTPClient.tlsMode.
+        """
+        client = ESMTPClient('', '', '')
+        client.tlsMode = False
+        warningsShown = self.flushWarnings([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 12.2")
+
+    test_esmtpClientTlsModeDeprecation.suppress = []
