* made SENDMAIL work (really?)
This commit is contained in:
parent
c5ea2c24b7
commit
86a71b09a2
12
smtp.scm
12
smtp.scm
|
@ -13,10 +13,8 @@
|
||||||
;;; scsh's socket module
|
;;; scsh's socket module
|
||||||
;;; :optional
|
;;; :optional
|
||||||
;;; error
|
;;; error
|
||||||
;;; switchq (Conditional macro)
|
|
||||||
;;; ? (COND)
|
|
||||||
;;; read-crlf-line write-crlf
|
;;; read-crlf-line write-crlf
|
||||||
;;; \n \r in strings (Not R4RS)
|
;;; \n \r in strings (Not R5RS)
|
||||||
|
|
||||||
;;; SMTP protocol procedures tend to return two values:
|
;;; SMTP protocol procedures tend to return two values:
|
||||||
;;; - CODE The integer SMTP reply code returned by server for the transaction.
|
;;; - CODE The integer SMTP reply code returned by server for the transaction.
|
||||||
|
@ -39,8 +37,10 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
|
||||||
;;; This is broken -- the (SYSTEM-NAME) proc returns a local name, not a
|
;;; This is broken -- the (SYSTEM-NAME) proc returns a local name, not
|
||||||
;;; useful Internet host name. How do we do that?
|
;;; a useful Internet host name. How do we do that?
|
||||||
|
;;; [Andreas:] I've inserted a way to do this. It works fine on my
|
||||||
|
;;; system. Does it work on your, too?
|
||||||
|
|
||||||
;;; (sendmail to-list body [host])
|
;;; (sendmail to-list body [host])
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
(define (sendmail to-list body . maybe-host)
|
(define (sendmail to-list body . maybe-host)
|
||||||
(call-with-current-continuation
|
(call-with-current-continuation
|
||||||
(lambda (bailout)
|
(lambda (bailout)
|
||||||
(let ((local (system-name))
|
(let ((local (host-info:name (host-info (system-name))))
|
||||||
(socket (smtp/open (:optional maybe-host "localhost"))))
|
(socket (smtp/open (:optional maybe-host "localhost"))))
|
||||||
(receive (code text) (smtp-transactions socket ; Do prologue.
|
(receive (code text) (smtp-transactions socket ; Do prologue.
|
||||||
(smtp/helo socket local)
|
(smtp/helo socket local)
|
||||||
|
|
Loading…
Reference in New Issue