original commit: b316f184496c72e844aa26ccbe5bbf5ec42a0eef
This commit is contained in:
Matthias Felleisen 2002-01-26 02:57:54 +00:00
parent fa470cf8f7
commit 1648706cd8

View File

@ -68,18 +68,29 @@
(let loop ((to recipients) (indent header-space)) (let loop ((to recipients) (indent header-space))
(if (null? to) (if (null? to)
(newline writer) (newline writer)
(let ((first (car to))) (let ((first (car to))
[rest (cdr to)])
(let ((len (string-length first))) (let ((len (string-length first)))
(if (>= (+ len indent) 80) (if (>= (+ len indent) 80)
(begin (begin
(fprintf writer "~n ~a, " first) (fprintf writer
(loop (cdr to) (+ len header-space 2))) (if (null? rest)
"~n ~a"
"~n ~a, ")
first)
(loop (cdr to)
(+ len header-space 2)))
(begin (begin
(fprintf writer "~a, " first) (fprintf writer
(if (null? rest)
"~a "
"~a, ")
first)
(loop (cdr to) (loop (cdr to)
(+ len indent 2)))))))))))) (+ len indent 2))))))))))))
(write-recipient-header "To" to-recipients) (write-recipient-header "To" to-recipients)
(write-recipient-header "CC" cc-recipients)) (unless (null? cc-recipients)
(write-recipient-header "CC" cc-recipients)))
(fprintf writer "Subject: ~a~n" subject) (fprintf writer "Subject: ~a~n" subject)
(fprintf writer "X-Mailer: MzScheme: see www.plt-scheme.org~n") (fprintf writer "X-Mailer: MzScheme: see www.plt-scheme.org~n")
(for-each (lambda (s) (for-each (lambda (s)