Index: doc/mail/tutorial/smtpclient/smtpclient.xhtml
===================================================================
--- doc/mail/tutorial/smtpclient/smtpclient.xhtml	(revision 34936)
+++ doc/mail/tutorial/smtpclient/smtpclient.xhtml	(working copy)
@@ -71,10 +71,9 @@
 <pre class="shell">
 exarkun@boson:~/mail/tutorial/smtpclient$ twistd -ny smtpclient-1.tac
 18:31 EST [-] Log opened.
-18:31 EST [-] twistd 2.0.0 (/usr/bin/python2.4 2.4.1) starting up
-18:31 EST [-] reactor class: twisted.internet.selectreactor.SelectReactor
-18:31 EST [-] Loading smtpclient-1.tac...
-18:31 EST [-] Loaded.
+18:31 EST [-] using set_wakeup_fd
+18:31 EST [-] twistd 12.1.0 (/usr/bin/python2.7 2.7.3) starting up.
+18:31 EST [-] reactor class: twisted.internet.epollreactor.EPollReactor.
 </pre>
 
 <p>As we expected, not much is going on.  We can shutdown this server
@@ -145,35 +144,39 @@
 <pre class="shell">
 exarkun@boson:~/mail/tutorial/smtpclient$ twistd -ny smtpclient-2.tac
 18:55 EST [-] Log opened.
-18:55 EST [-] twistd SVN-Trunk (/usr/bin/python2.4 2.4.1) starting up
-18:55 EST [-] reactor class: twisted.internet.selectreactor.SelectReactor
-18:55 EST [-] Loading smtpclient-2.tac...
-18:55 EST [-] Loaded.
-18:55 EST [-] Starting factory &lt;twisted.internet.protocol.ClientFactory
-              instance at 0xb791e46c&gt;
+18:55 EST [-] using set_wakeup_fd 
+18:55 EST [-] twistd 12.1.0 (/usr/bin/python2.7 2.7.3) starting up.
+18:55 EST [-] reactor class: twisted.internet.epollreactor.EPollReactor.
 18:55 EST [-] Traceback (most recent call last):
-          File "twisted/scripts/twistd.py", line 187, in runApp
-            app.runReactorWithLogging(config, oldstdout, oldstderr)
-          File "twisted/application/app.py", line 128, in runReactorWithLogging
-            reactor.run()
-          File "twisted/internet/posixbase.py", line 200, in run
-            self.mainLoop()
-          File "twisted/internet/posixbase.py", line 208, in mainLoop
-            self.runUntilCurrent()
-        --- &lt;exception caught here&gt; ---
-          File "twisted/internet/base.py", line 533, in runUntilCurrent
-            call.func(*call.args, **call.kw)
-          File "twisted/internet/tcp.py", line 489, in resolveAddress
-            if abstract.isIPAddress(self.addr[0]):
-          File "twisted/internet/abstract.py", line 315, in isIPAddress
-            parts = string.split(addr, '.')
-          File "/usr/lib/python2.4/string.py", line 292, in split
-            return s.split(sep, maxsplit)
-        exceptions.AttributeError: 'NoneType' object has no attribute 'split'
-
-18:55 EST [-] Received SIGINT, shutting down.
-18:55 EST [-] Main loop terminated.
-18:55 EST [-] Server Shut Down.
+          File &quot;/usr/bin/twistd&quot;, line 14, in &lt;module&gt;
+            run()
+          File &quot;/usr/bin/twistd&quot;, line 27, in run
+            app.run(runApp, ServerOptions)
+          File &quot;twisted/application/app.py&quot;, line 652, in run
+            runApp(config)
+          File &quot;twisted/scripts/twistd.py&quot;, line 23, in runApp
+            SomeApplicationRunner(config).run()
+          File &quot;twisted/application/app.py&quot;, line 390, in run
+            self.postApplication()
+          File &quot;twisted/scripts/_twistd_unix.py&quot;, line 230, in postApplication
+            self.startApplication(self.application)
+          File &quot;twisted/scripts/_twistd_unix.py&quot;, line 349, in startApplication
+            app.startApplication(application, not self.config['no_save'])
+          File &quot;twisted/application/app.py&quot;, line 668, in startApplication
+            service.IService(application).startService()
+          File &quot;twisted/application/service.py&quot;, line 282, in startService
+            service.startService()
+          File &quot;twisted/application/internet.py&quot;, line 168, in startService
+            self._connection = self._getConnection()
+          File &quot;twisted/application/internet.py&quot;, line 186, in _getConnection
+            'connect%s' % (self.method,))(*self.args, **self.kwargs)
+          File &quot;twisted/internet/posixbase.py&quot;, line 470, in connectTCP
+            c = tcp.Connector(host, port, factory, timeout, bindAddress, self)
+          File &quot;twisted/internet/tcp.py&quot;, line 1108, in __init__
+            if abstract.isIPv6Address(host):
+          File &quot;twisted/internet/abstract.py&quot;, line 504, in isIPv6Address
+            if '%' in addr:
+18:55 EST [-] TypeError: argument of type 'NoneType' is not iterable
 exarkun@boson:~/mail/tutorial/smtpclient$
 </pre>
 
@@ -198,46 +201,48 @@
 </pre>
 
 <p>This directs the client to connect to <em>localhost</em> on
-port <em>25</em>.  This isn't the address we want ultimately, but it's
-a good place-holder for the time being.  We can
-run <a href="smtpclient-3.tac">smtpclient-3.tac</a> and see what this
+port <em>25</em>. This isn't the address we want ultimately, but it's
+a good place-holder for the time being. If you don't have a local SMTP
+server, you can replace <em>localhost</em> with other SMTP servers (like
+<em>ASPMX.L.GOOGLE.COM</em>). The rest of the tutorial will require a
+working SMTP server. We can run
+<a href="smtpclient-3.tac">smtpclient-3.tac</a> and see what this
 change gets us:</p>
 
 <pre class="shell">
 exarkun@boson:~/mail/tutorial/smtpclient$ twistd -ny smtpclient-3.tac
 19:10 EST [-] Log opened.
-19:10 EST [-] twistd SVN-Trunk (/usr/bin/python2.4 2.4.1) starting up
-19:10 EST [-] reactor class: twisted.internet.selectreactor.SelectReactor
-19:10 EST [-] Loading smtpclient-3.tac...
-19:10 EST [-] Loaded.
+19:10 EST [-] using set_wakeup_fd 
+19:10 EST [-] twistd 12.1.0 (/usr/bin/python2.7 2.7.3) starting up.
+19:10 EST [-] reactor class: twisted.internet.epollreactor.EPollReactor.
 19:10 EST [-] Starting factory &lt;twisted.internet.protocol.ClientFactory
-              instance at 0xb791e48c&gt;
-19:10 EST [-] Enabling Multithreading.
-19:10 EST [Uninitialized] Traceback (most recent call last):
-          File "twisted/python/log.py", line 56, in callWithLogger
+              instance at 0x7f76e9a7df38&gt;
+19:10 EST [-] [Uninitialized] Unhandled Error
+        Traceback (most recent call last):
+          File "twisted/python/log.py", line 84, in callWithLogger
             return callWithContext({"system": lp}, func, *args, **kw)
-          File "twisted/python/log.py", line 41, in callWithContext
+          File "twisted/python/log.py", line 69, in callWithContext
             return context.call({ILogContext: newCtx}, func, *args, **kw)
-          File "twisted/python/context.py", line 52, in callWithContext
+          File "twisted/python/context.py", line 118, in callWithContext
             return self.currentContext().callWithContext(ctx, func, *args, **kw)
-          File "twisted/python/context.py", line 31, in callWithContext
+          File "twisted/python/context.py", line 81, in callWithContext
             return func(*args,**kw)
         --- &lt;exception caught here&gt; ---
-          File "twisted/internet/selectreactor.py", line 139, in _doReadOrWrite
-            why = getattr(selectable, method)()
-          File "twisted/internet/tcp.py", line 543, in doConnect
+          File "twisted/internet/posixbase.py", line 619, in _doReadOrWrite
+            why = selectable.doWrite()
+          File "twisted/internet/tcp.py", line 581, in doConnect
             self._connectDone()
-          File "twisted/internet/tcp.py", line 546, in _connectDone
+          File "twisted/internet/tcp.py", line 595, in _connectDone
             self.protocol = self.connector.buildProtocol(self.getPeer())
-          File "twisted/internet/base.py", line 641, in buildProtocol
+          File "twisted/internet/base.py", line 1049, in buildProtocol
             return self.factory.buildProtocol(addr)
-          File "twisted/internet/protocol.py", line 99, in buildProtocol
+          File "twisted/internet/protocol.py", line 104, in buildProtocol
             p = self.protocol()
         exceptions.TypeError: 'NoneType' object is not callable
 
-19:10 EST [Uninitialized] Stopping factory
-          &lt;twisted.internet.protocol.ClientFactory instance at
-          0xb791e48c&gt;
+19:10 EST [-] [Uninitialized] Stopping factory
+              &lt;twisted.internet.protocol.ClientFactory
+              instance at 0x7f76e9a7df38&gt;
 19:10 EST [-] Received SIGINT, shutting down.
 19:10 EST [-] Main loop terminated.
 19:10 EST [-] Server Shut Down.
@@ -271,17 +276,15 @@
 <pre class="shell">
 exarkun@boson:~/doc/mail/tutorial/smtpclient$ twistd -ny smtpclient-4.tac
 19:29 EST [-] Log opened.
-19:29 EST [-] twistd SVN-Trunk (/usr/bin/python2.4 2.4.1) starting up
-19:29 EST [-] reactor class: twisted.internet.selectreactor.SelectReactor
-19:29 EST [-] Loading smtpclient-4.tac...
-19:29 EST [-] Loaded.
+19:29 EST [-] using set_wakeup_fd
+19:29 EST [-] twistd 12.1.0 (/usr/bin/python2.7 2.7.3) starting up.
+19:29 EST [-] reactor class: twisted.internet.epollreactor.EPollReactor.
 19:29 EST [-] Starting factory &lt;twisted.internet.protocol.ClientFactory
-              instance at 0xb791e4ac&gt;
-19:29 EST [-] Enabling Multithreading.
+              instance at 0x7fe80358ff38&gt;
 19:29 EST [-] Received SIGINT, shutting down.
 19:29 EST [Protocol,client] Stopping factory
           &lt;twisted.internet.protocol.ClientFactory instance at
-          0xb791e4ac&gt;
+          0x7fe80358ff38&gt;
 19:29 EST [-] Main loop terminated.
 19:29 EST [-] Server Shut Down.
 exarkun@boson:~/doc/mail/tutorial/smtpclient$
@@ -338,38 +341,36 @@
 <pre class="shell">
 exarkun@boson:~/doc/mail/tutorial/smtpclient$ twistd -ny smtpclient-5.tac
 19:42 EST [-] Log opened.
-19:42 EST [-] twistd SVN-Trunk (/usr/bin/python2.4 2.4.1) starting up
-19:42 EST [-] reactor class: twisted.internet.selectreactor.SelectReactor
-19:42 EST [-] Loading smtpclient-5.tac...
-19:42 EST [-] Loaded.
+19:42 EST [-] twistd 12.1.0 (/usr/bin/python2.7 2.7.3) starting up.
+19:42 EST [-] reactor class: twisted.internet.epollreactor.EPollReactor.
 19:42 EST [-] Starting factory &lt;twisted.internet.protocol.ClientFactory
-              instance at 0xb791e54c&gt;
-19:42 EST [-] Enabling Multithreading.
-19:42 EST [Uninitialized] Traceback (most recent call last):
-          File "twisted/python/log.py", line 56, in callWithLogger
+              instance at 0x7fd5267eff38&gt;
+19:42 EST [Uninitialized] Unhandled Error
+        Traceback (most recent call last):
+          File "twisted/python/log.py", line 84, in callWithLogger
             return callWithContext({"system": lp}, func, *args, **kw)
-          File "twisted/python/log.py", line 41, in callWithContext
+          File "twisted/python/log.py", line 69, in callWithContext
             return context.call({ILogContext: newCtx}, func, *args, **kw)
-          File "twisted/python/context.py", line 52, in callWithContext
+          File "twisted/python/context.py", line 118, in callWithContext
             return self.currentContext().callWithContext(ctx, func, *args, **kw)
-          File "twisted/python/context.py", line 31, in callWithContext
+          File "twisted/python/context.py", line 81, in callWithContext
             return func(*args,**kw)
         --- &lt;exception caught here&gt; ---
-          File "twisted/internet/selectreactor.py", line 139, in _doReadOrWrite
-            why = getattr(selectable, method)()
-          File "twisted/internet/tcp.py", line 543, in doConnect
+          File "twisted/internet/posixbase.py", line 619, in _doReadOrWrite
+            why = selectable.doWrite()
+          File "twisted/internet/tcp.py", line 581, in doConnect
             self._connectDone()
-          File "twisted/internet/tcp.py", line 546, in _connectDone
+          File "twisted/internet/tcp.py", line 595, in _connectDone
             self.protocol = self.connector.buildProtocol(self.getPeer())
-          File "twisted/internet/base.py", line 641, in buildProtocol
+          File "twisted/internet/base.py", line 1049, in buildProtocol
             return self.factory.buildProtocol(addr)
-          File "twisted/internet/protocol.py", line 99, in buildProtocol
+          File "twisted/internet/protocol.py", line 104, in buildProtocol
             p = self.protocol()
         exceptions.TypeError: __init__() takes at least 2 arguments (1 given)
 
 19:42 EST [Uninitialized] Stopping factory
           &lt;twisted.internet.protocol.ClientFactory instance at
-          0xb791e54c&gt;
+          0x7fd5267eff38&gt;
 19:43 EST [-] Received SIGINT, shutting down.
 19:43 EST [-] Main loop terminated.
 19:43 EST [-] Server Shut Down.
@@ -426,49 +427,49 @@
 
 <pre class="shell">
 exarkun@boson:~/doc/mail/tutorial/smtpclient$ twistd -ny smtpclient-6.tac
-21:17 EST [-] Log opened.
-21:17 EST [-] twistd SVN-Trunk (/usr/bin/python2.4 2.4.1) starting up
-21:17 EST [-] reactor class: twisted.internet.selectreactor.SelectReactor
-21:17 EST [-] Loading smtpclient-6.tac...
-21:17 EST [-] Loaded.
-21:17 EST [-] Starting factory &lt;__builtin__.SMTPClientFactory instance
-              at 0xb77fd68c&gt;
-21:17 EST [-] Enabling Multithreading.
-21:17 EST [ESMTPClient,client] Traceback (most recent call last):
-          File "twisted/python/log.py", line 56, in callWithLogger
+07:54:15+0400 [-] Log opened.
+07:54:15+0400 [-] twistd 12.1.0 (/usr/bin/python2.7 2.7.3) starting up.
+07:54:15+0400 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
+07:54:15+0400 [-] Starting factory &lt;__builtin__.SMTPClientFactory instance
+                             at 0xcdffc8&gt;
+07:54:19+0400 [ESMTPClient,client] Unhandled Error
+        Traceback (most recent call last):
+          File "twisted/python/log.py", line 84, in callWithLogger
             return callWithContext({"system": lp}, func, *args, **kw)
-          File "twisted/python/log.py", line 41, in callWithContext
+          File "twisted/python/log.py", line 69, in callWithContext
             return context.call({ILogContext: newCtx}, func, *args, **kw)
-          File "twisted/python/context.py", line 52, in callWithContext
+          File "twisted/python/context.py", line 118, in callWithContext
             return self.currentContext().callWithContext(ctx, func, *args, **kw)
-          File "twisted/python/context.py", line 31, in callWithContext
+          File "twisted/python/context.py", line 81, in callWithContext
             return func(*args,**kw)
         --- &lt;exception caught here&gt; ---
-          File "twisted/internet/selectreactor.py", line 139, in _doReadOrWrite
-            why = getattr(selectable, method)()
-          File "twisted/internet/tcp.py", line 351, in doRead
-            return self.protocol.dataReceived(data)
-          File "twisted/protocols/basic.py", line 221, in dataReceived
+          File "twisted/internet/posixbase.py", line 614, in _doReadOrWrite
+            why = selectable.doRead()
+          File "twisted/internet/tcp.py", line 203, in doRead
+            return self._dataReceived(data)
+          File "twisted/internet/tcp.py", line 209, in doRead
+            rval = self.protocol.dataReceived(data)
+          File "twisted/protocols/basic.py", line 564, in dataReceived
             why = self.lineReceived(line)
-          File "twisted/mail/smtp.py", line 1039, in lineReceived
+          File "twisted/mail/smtp.py", line 1064, in lineReceived
             why = self._okresponse(self.code,'\n'.join(self.resp))
-          File "twisted/mail/smtp.py", line 1281, in esmtpState_serverConfig
+          File "twisted/mail/smtp.py", line 1322, in esmtpState_serverConfig
             self.tryTLS(code, resp, items)
-          File "twisted/mail/smtp.py", line 1294, in tryTLS
+          File "twisted/mail/smtp.py", line 1335, in tryTLS
             self.authenticate(code, resp, items)
-          File "twisted/mail/smtp.py", line 1343, in authenticate
+          File "twisted/mail/smtp.py", line 1384, in authenticate
             self.smtpState_from(code, resp)
-          File "twisted/mail/smtp.py", line 1062, in smtpState_from
+          File "twisted/mail/smtp.py", line 1087, in smtpState_from
             self._from = self.getMailFrom()
-          File "twisted/mail/smtp.py", line 1137, in getMailFrom
+          File "twisted/mail/smtp.py", line 1173, in getMailFrom
             raise NotImplementedError
-        exceptions.NotImplementedError:
+        exceptions.NotImplementedError: 
 
-21:17 EST [ESMTPClient,client] Stopping factory
-          &lt;__builtin__.SMTPClientFactory instance at 0xb77fd68c&gt;
-21:17 EST [-] Received SIGINT, shutting down.
-21:17 EST [-] Main loop terminated.
-21:17 EST [-] Server Shut Down.
+07:54:19+0400 [ESMTPClient,client] Stopping factory 
+              &lt;__builtin__.SMTPClientFactory instance at 0xcdffc8&gt;
+07:56:10+0400 [-] Received SIGINT, shutting down.
+07:56:10+0400 [-] Main loop terminated.
+07:56:10+0400 [-] Server Shut Down.
 exarkun@boson:~/doc/mail/tutorial/smtpclient$
 </pre>
 
@@ -580,6 +581,10 @@
 no matter how many times you retry them), it will be between 500 and
 599.</p>
 
+<p>To try it, you will need to change the <code>mailTo</code> variable
+to something real, and run the script like before! You should receive
+the email in your Spam mailbox.</p>
+
 <h3>SMTP Client 8</h3>
 
 <p>Thus far we have succeeded in creating a Twisted client application
@@ -603,13 +608,10 @@
 <pre class="shell">
 exarkun@boson:~/doc/mail/tutorial/smtpclient$ twistd -ny smtpclient-8.tac
 19:52 EST [-] Log opened.
-19:52 EST [-] twistd SVN-Trunk (/usr/bin/python2.4 2.4.1) starting up
-19:52 EST [-] reactor class: twisted.internet.selectreactor.SelectReactor
-19:52 EST [-] Loading smtpclient-8.tac...
-19:52 EST [-] Loaded.
+19:52 EST [-] twistd 12.1.0 (/usr/bin/python2.7 2.7.3) starting up.
+19:52 EST [-] reactor class: twisted.internet.epollreactor.EPollReactor.
 19:52 EST [-] Starting factory &lt;__builtin__.SMTPClientFactory instance
               at 0xb791beec&gt;
-19:52 EST [-] Enabling Multithreading.
 19:52 EST [SMTPTutorialClient,client] Sent 1 messages
 19:52 EST [SMTPTutorialClient,client] Stopping factory
           &lt;__builtin__.SMTPClientFactory instance at 0xb791beec&gt;
