         # File lib/protocols/smtpserver.rb, line 289
    289:                 def process_data
    290:                         unless @state.include?(:rcpt)
    291:                                 send_data "503 Operation sequence error\r\n"
    292:                         else
    293:                                 succeeded = proc {
    294:                                         send_data "354 Send it\r\n"
    295:                                         @state << :data
    296:                                         @databuffer = []
    297:                                 }
    298:                                 failed = proc {
    299:                                         send_data "550 Operation failed\r\n"
    300:                                 }
    301:
    302:                                 d = receive_data_command
    303:
    304:                                 if d.respond_to?(:callback)
    305:                                         d.callback(&succeeded)
    306:                                         d.errback(&failed)
    307:                                 else
    308:                                         (d ? succeeded : failed).call
    309:                                 end
    310:                         end
    311:                 end