From 4b3644c99521ba459c064c472ccd38b22ffcbe11 Mon Sep 17 00:00:00 2001 From: Drew Crampsie Date: Thu, 30 Nov 2023 16:28:48 -0800 Subject: [PATCH] Modify interface to (hopefully) make send-mail work. --- src/std/net/smtp/README.org | 8 ++++---- src/std/net/smtp/interface.ss | 2 +- src/std/net/smtp/session.ss | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/std/net/smtp/README.org b/src/std/net/smtp/README.org index cf216205c4..159641a72d 100644 --- a/src/std/net/smtp/README.org +++ b/src/std/net/smtp/README.org @@ -572,7 +572,7 @@ https://datatracker.ietf.org/doc/html/rfc5321 (export #t) (interface (SMTP Socket) - (send-mail return-path forward-path) + (send-mail return-path forward-path . data) (send-command cmd) (read-all) (read-lines) (keywords) (socket) (reader) (writer) @@ -604,7 +604,7 @@ https://datatracker.ietf.org/doc/html/rfc5321 (defstruct session (address sock reader writer) constructor: :init!) ;;; Socket interface implementation passhtrough (defmethod {socket session} - (lambda (self) (using (s self : session) s.sock)) rebind: #t) + (lambda (self) (using (s self : session) s.sock))) (defmethod {reader session} (lambda (self) (using (s self :- session) s.reader))) (defmethod {writer session} @@ -689,7 +689,7 @@ https://datatracker.ietf.org/doc/html/rfc5321 ((string? thing) (send-command sess (->u8vector thing))) (else (error "Trying to send a non-u8vector or non-string" thing)))) - (defmethod {send-command session} send-command rebind: #t) + (defmethod {send-command session} send-command) #+end_src @@ -733,7 +733,7 @@ https://datatracker.ietf.org/doc/html/rfc5321 (else (cons (->s u8v start (- crlf 1)) (readln (+ 1 crlf))))))))) - (defmethod {read-lines session} session-read-lines rebind: #t) + (defmethod {read-lines session} session-read-lines) #+end_src diff --git a/src/std/net/smtp/interface.ss b/src/std/net/smtp/interface.ss index 2761c8a37d..ade01339c3 100644 --- a/src/std/net/smtp/interface.ss +++ b/src/std/net/smtp/interface.ss @@ -2,7 +2,7 @@ (export #t) (interface (SMTP Socket) - (send-mail return-path forward-path) + (send-mail return-path forward-path . data) (send-command cmd) (read-all) (read-lines) (keywords) (socket) (reader) (writer) diff --git a/src/std/net/smtp/session.ss b/src/std/net/smtp/session.ss index a6b8eecb22..29da2060d3 100644 --- a/src/std/net/smtp/session.ss +++ b/src/std/net/smtp/session.ss @@ -6,7 +6,7 @@ (defstruct session (address sock reader writer) constructor: :init!) ;;; Socket interface implementation passhtrough (defmethod {socket session} - (lambda (self) (using (s self : session) s.sock)) rebind: #t) + (lambda (self) (using (s self : session) s.sock))) (defmethod {reader session} (lambda (self) (using (s self :- session) s.reader))) (defmethod {writer session} @@ -73,7 +73,7 @@ ((string? thing) (send-command sess (->u8vector thing))) (else (error "Trying to send a non-u8vector or non-string" thing)))) -(defmethod {send-command session} send-command rebind: #t) +(defmethod {send-command session} send-command) (def (u8vector-find-crlf u8v (start 0)) (def len (u8vector-length u8v)) @@ -95,4 +95,4 @@ (else (cons (->s u8v start (- crlf 1)) (readln (+ 1 crlf))))))))) -(defmethod {read-lines session} session-read-lines rebind: #t) +(defmethod {read-lines session} session-read-lines)