Index: twisted/mail/test/test_smtp.py
===================================================================
--- twisted/mail/test/test_smtp.py	(revision 35790)
+++ twisted/mail/test/test_smtp.py	(working copy)
@@ -1518,3 +1518,26 @@
         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.
+        """
+        import warnings
+        with warnings.catch_warnings(record=True) as w:
+            warnings.simplefilter("default")
+            from twisted.mail.smtp import ESMTPClient
+            client = ESMTPClient('', '', '')
+            self.assertEqual(len(w), 1)
+            self.assertIdentical(w[-1].category, DeprecationWarning)
+            self.assertEqual(str(w[-1].message), "tlsMode attribute of 
+                twisted.mail.smtp.ESMTPClient is deprecated since Twisted 
+                12.2")
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 was deprecated since Twisted 12.2. 
\ No newline at end of file
Index: twisted/mail/smtp.py
===================================================================
--- twisted/mail/smtp.py	(revision 35790)
+++ 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
@@ -1239,6 +1240,13 @@
     # ClientContextFactory to use for STARTTLS
     context = None
 
+    def __setattr__(self, name, val):
+        if name == 'tlsMode':
+            warnings.warn("tlsMode attribute of twisted.mail.ESMTPClient is 
+                    deprecated since Twisted 12.2", 
+                    category=DeprecationWarning, stacklevel=2)
+
+
     def __init__(self, secret, contextFactory=None, *args, **kw):
         SMTPClient.__init__(self, *args, **kw)
         self.authenticators = []
