 ! Copyright (C) 2007 Elie CHAFTARI
 ! See http://factorcode.org/license.txt for BSD license.
+USING: combinators kernel prettyprint io io.timeouts io.server
+sequences namespaces io.sockets continuations calendar io.encodings.ascii ;
+IN: smtp.server
 
 ! Mock SMTP server for testing purposes.
 


: smtp-server ( port -- )
    "Starting SMTP server on port " write dup . flush
    "127.0.0.1" swap <inet4> <server> [
        accept [
            1 minutes stdio get set-timeout
            "220 hello\r\n" write flush

! QUIT
! bye
! Connection closed by foreign host.

SYMBOL: data-mode

