parameters: (self, msg, callback=None)
docstring: SMTP 'DATA' command -- sends message data to server.
  
          Automatically quotes lines beginning with a period per rfc821.
          Raises SMTPDataError if there is an unexpected reply to the
          DATA command; the return value from this method is the final
          response code received when the all data is sent.
docstring_summary: SMTP 'DATA' command -- sends message data to server.
docstring_tokens: SMTP DATA command -- sends message data to server .
function: def data(self, msg, callback=None):
          """SMTP 'DATA' command -- sends message data to server.
  
          Automatically quotes lines beginning with a period per rfc821.
          Raises SMTPDataError if there is an unexpected reply to the
          DATA command; the return value from this method is the final
          response code received when the all data is sent.
          """
          yield gen.Task(self.putcmd, "data")
          result = yield gen.Task(self.getreply)
          (code, repl) = result.args
          if self.debuglevel >0 : print>>stderr, "data:", (code,repl)
          if code != 354:
              raise SMTPDataError(code,repl)
          else:
              q = quotedata(msg)
              if q[-2:] != CRLF:
                  q = q + CRLF
              q = q + "." + CRLF
              yield gen.Task(self.send, q)
              result = yield gen.Task(self.getreply)
              (code, msg) = result.args
              if self.debuglevel >0 : print>>stderr, "data:", (code,msg)
              if callback:
                  callback(code, msg)
function_tokens: def data ( self , msg , callback = None ) : yield gen . Task ( self . putcmd , "data" ) result = yield gen . Task ( self . getreply ) ( code , repl ) = result . args if self . debuglevel > 0 : print >> stderr , "data:" , ( code , repl ) if code != 354 : raise SMTPDataError ( code , repl ) else : q = quotedata ( msg ) if q [ - 2 : ] != CRLF : q = q + CRLF q = q + "." + CRLF yield gen . Task ( self . send , q ) result = yield gen . Task ( self . getreply ) ( code , msg ) = result . args if self . debuglevel > 0 : print >> stderr , "data:" , ( code , msg ) if callback : callback ( code , msg )