diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index 9df4b519e1..2c92092bf9 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -843,6 +843,9 @@ class FakeSMTPServer(smtpd.SMTPServer, threading.Thread):
 
     def __init__(self, *args, **kwargs):
         threading.Thread.__init__(self)
+        # New kwarg added in Python 3.5; default switching to False in 3.6.
+        if sys.version_info >= (3, 5):
+            kwargs['decode_data'] = True
         smtpd.SMTPServer.__init__(self, *args, **kwargs)
         self._sink = []
         self.active = False