Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
b1990c2d
...
b1990c2d1c897e0cb85f388d2a2af084ed1d94ef
authored
2001-08-05 13:54:57 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use ports instead of mu-body- interface.
1 parent
724d1f5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
examples/reply.scm
examples/reply.scm
View file @
b1990c2
...
...
@@ -36,8 +36,8 @@ Kind regards\n")
;; Reply to the incoming message
(
define
(
reply
in-msg
)
(
let*
((
out-msg
(
mu-message-create
))
(
in
body
(
mu-message-get-body
in-msg
))
(
out
body
(
mu-message-get-body
out-msg
)))
(
in
-port
(
mu-message-get-port
in-msg
"r"
))
(
out
-port
(
mu-message-get-port
out-msg
"w"
)))
(
mu-message-set-header
out-msg
"To"
(
mu-message-get-header
in-msg
"From"
))
(
mu-message-set-header
out-msg
"Cc"
...
...
@@ -47,18 +47,22 @@ Kind regards\n")
"Re: "
(
mu-message-get-header
in-msg
"Subject"
)))
(
mu-body-write
outbody
reply-tex
t
)
(
display
reply-text
out-por
t
)
(
mu-body-write
outbody
"\n\nOriginal message:\n"
)
(
display
"\n\nOriginal message:\n"
out-port
)
(
do
((
hdr
(
mu-message-get-header-fields
in-msg
)
(
cdr
hdr
)))
((
null?
hdr
)
#f
)
(
let
((
s
(
car
hdr
)))
(
mu-body-write
outbody
(
string-append
indent-prefix
(
car
s
)
": "
(
cdr
s
)
"\n"
))))
(
mu-body-write
outbody
(
string-append
indent-prefix
"\n"
))
(
do
((
line
(
mu-body-read-line
inbody
)
(
mu-body-read-line
inbody
)))
(
display
(
string-append
indent-prefix
(
car
s
)
": "
(
cdr
s
)
"\n"
)
out-port
)))
(
display
(
string-append
indent-prefix
"\n"
)
out-port
)
(
do
((
line
(
read-line
in-port
)
(
read-line
in-port
)))
((
eof-object?
line
)
#f
)
(
mu-body-write
outbody
(
string-append
indent-prefix
line
)))
(
display
(
string-append
indent-prefix
line
"\n"
)
out-port
))
(
close-input-port
in-port
)
(
close-output-port
out-port
)
(
mu-message-send
out-msg
)))
...
...
Please
register
or
sign in
to post a comment