racket/collects/net/pop3.rkt
Eli Barzilay debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00

31 lines
823 B
Racket

#lang racket/base
(require racket/unit "pop3-sig.rkt" "pop3-unit.rkt")
(define-values/invoke-unit/infer pop3@)
(provide-signature-elements pop3^)
#|
> (require-library "pop3.rkt" "net")
> (define c (connect-to-server "cs.rice.edu"))
> (authenticate/plain-text "scheme" "********" c)
> (get-mailbox-status c)
100
177824
> (get-message/headers c 100)
("Date: Thu, 6 Nov 1997 12:34:18 -0600 (CST)"
"Message-Id: <199711061834.MAA11961@new-world.cs.rice.edu>"
"From: Shriram Krishnamurthi <shriram@cs.rice.edu>"
...
"Status: RO")
> (get-message/complete c 100)
("Date: Thu, 6 Nov 1997 12:34:18 -0600 (CST)"
"Message-Id: <199711061834.MAA11961@new-world.cs.rice.edu>"
"From: Shriram Krishnamurthi <shriram@cs.rice.edu>"
...
"Status: RO")
("some body" "text" "goes" "." "here" "." "")
> (disconnect-from-server c)
|#