Skip to content

Commit

Permalink
Add a working SMTP client. Needs some cleaning but almost done!
Browse files Browse the repository at this point in the history
  • Loading branch information
drewc committed Nov 17, 2023
1 parent e636e36 commit 9860e36
Show file tree
Hide file tree
Showing 11 changed files with 1,365 additions and 0 deletions.
23 changes: 23 additions & 0 deletions doc/reference/std/net/smtp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SMTP: Simple Mail Tranfser Protocol

(import :std/net/smtp)

> (def mail (smtp-connect "localhost:8025"))
> (send-mail mail "<[email protected]>" "[email protected]"
To: "All Users <[email protected]>"
From: "No Reply <[email protected]>"
Subject: "This is a subject"
"Body not by itself")
("250 2.0.0 Ok: queued as 1E29D10201C2")

> (send-mail mail "<[email protected]>" "[email protected]" "No headers just body")
("250 2.0.0 Ok: queued as 1111A10201C2")

> (send-mail mail "<[email protected]>" "[email protected]"
[Subject: "Headers can be a plist"] From: "Nested even!"
"because who knows")
("250 2.0.0 Ok: queued as 5C4F810201C2")

> (SMTP-QUIT mail)
("221 2.0.0 Bye")

11 changes: 11 additions & 0 deletions src/std/build-spec.ss
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,17 @@
"net/s3/interface"
"net/s3/api"
"net/s3/sigv4"
"net/smtp/interface"
"net/smtp/session"
"net/smtp/client"
"net/smtp/connection"
"net/smtp/data"
"net/smtp/headers"
"net/smtp/api"
"net/smtp"
"net/websocket/server"
"net/websocket/api"
"net/websocket"
"net/websocket/interface"
"net/websocket/socket"
"net/websocket/client"
Expand Down
1 change: 1 addition & 0 deletions src/std/net/smtp.ss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(import ./smtp/api) (export (import: ./smtp/api))
Loading

0 comments on commit 9860e36

Please sign in to comment.