* 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
|
||||
;;; :optional
|
||||
;;; error
|
||||
;;; switchq (Conditional macro)
|
||||
;;; ? (COND)
|
||||
;;; 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:
|
||||
;;; - 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
|
||||
;;; useful Internet host name. How do we do that?
|
||||
;;; This is broken -- the (SYSTEM-NAME) proc returns a local name, not
|
||||
;;; 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])
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
@ -58,7 +58,7 @@
|
|||
(define (sendmail to-list body . maybe-host)
|
||||
(call-with-current-continuation
|
||||
(lambda (bailout)
|
||||
(let ((local (system-name))
|
||||
(let ((local (host-info:name (host-info (system-name))))
|
||||
(socket (smtp/open (:optional maybe-host "localhost"))))
|
||||
(receive (code text) (smtp-transactions socket ; Do prologue.
|
||||
(smtp/helo socket local)
|
||||
|
|
Loading…
Reference in New Issue