fixing SMTP for encodings (is ASCII appropriate?)
parent
52f04dcfa4
commit
d0e0a12cb0
|
@ -1,5 +1,8 @@
|
|||
! 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.
|
||||
|
||||
|
@ -27,10 +30,6 @@
|
|||
! bye
|
||||
! Connection closed by foreign host.
|
||||
|
||||
USING: combinators kernel prettyprint io io.timeouts io.server
|
||||
sequences namespaces io.sockets continuations calendar ;
|
||||
IN: smtp.server
|
||||
|
||||
SYMBOL: data-mode
|
||||
|
||||
: process ( -- )
|
||||
|
@ -64,7 +63,7 @@ SYMBOL: data-mode
|
|||
|
||||
: smtp-server ( port -- )
|
||||
"Starting SMTP server on port " write dup . flush
|
||||
"127.0.0.1" swap <inet4> <server> [
|
||||
"127.0.0.1" swap <inet4> ascii <server> [
|
||||
accept [
|
||||
1 minutes stdio get set-timeout
|
||||
"220 hello\r\n" write flush
|
||||
|
|
Loading…
Reference in New Issue