Index: twisted/mail/test/test_mail.py
===================================================================
--- twisted/mail/test/test_mail.py	(revision 34339)
+++ twisted/mail/test/test_mail.py	(working copy)
@@ -2008,9 +2008,6 @@
 
 
 
-
-
-
 class TestDomain:
     def __init__(self, aliases, users):
         self.aliases = aliases
@@ -2031,6 +2028,23 @@
             raise smtp.SMTPBadRcpt(user)
 
 
+
+class SSLContextFactoryTests(unittest.TestCase):
+    """
+    Tests for twisted.mail.protocols.SSLContextFactory.
+    """
+
+
+    def testDeprecation(self):
+        """
+        Test deprecation of twisted.mail.protocols.SSLContextFactory.
+        """
+        mail.protocols.SSLContextFactory('')
+        warningsShown = self.flushWarnings([self.testDeprecation])
+        self.assertEqual(len(warningsShown), 1)
+        self.assertIdentical(warningsShown[0]['category'], DeprecationWarning)
+        self.assertEqual(warningsShown[0]['message'], 'twisted.mail.protocols.SSLContextFactory was deprecated in Twisted 12.1.0: Use twisted.internet.ssl.DefaultOpenSSLContextFactory instead.')
+
 from twisted.python.runtime import platformType
 import types
 if platformType != "posix":
Index: twisted/mail/topfiles/4963.removal
===================================================================
--- twisted/mail/topfiles/4963.removal	(revision 0)
+++ twisted/mail/topfiles/4963.removal	(revision 0)
@@ -0,0 +1 @@
+twisted.mail.protocols.SSLContextFactory is now deprecated.
Index: twisted/mail/protocols.py
===================================================================
--- twisted/mail/protocols.py	(revision 34339)
+++ twisted/mail/protocols.py	(working copy)
@@ -12,6 +12,8 @@
 from twisted.internet import defer
 from twisted.copyright import longversion
 from twisted.python import log
+from twisted.python.deprecate import deprecatedModuleAttribute
+from twisted.python.versions import Version
 
 from twisted import cred
 import twisted.cred.error
@@ -213,6 +215,10 @@
     
     This loads a certificate and private key from a specified file.
     """
+
+    deprecatedModuleAttribute(Version("Twisted", 12, 1, 0), "Use twisted.internet.ssl.DefaultOpenSSLContextFactory instead.", "twisted.mail.protocols", "SSLContextFactory")
+
+
     def __init__(self, filename):
         self.filename = filename
 
