(define-record config host port spool-dir user group)
(define-record message to from text user password)
(define-record config host port spool-dir user group)
(define-record message to from text user password)
(let-values (((tcp-in tcp-out) (tcp-connect mail-server 25)))
(let ((smtp-session (make-outgoing-smtp-session tcp-in tcp-out)))
(let ((result (and
(let-values (((tcp-in tcp-out) (tcp-connect mail-server 25)))
(let ((smtp-session (make-outgoing-smtp-session tcp-in tcp-out)))
(let ((result (and
(smtp-session 'send "data")
(smtp-session 'expect "354")
(smtp-session 'send (message-text msg))
(smtp-session 'send ".")
(smtp-session 'send "data")
(smtp-session 'expect "354")
(smtp-session 'send (message-text msg))
(smtp-session 'send ".")
(smtp-session 'send "quit"))))
(close-input-port tcp-in)
(close-output-port tcp-out)
(smtp-session 'send "quit"))))
(close-input-port tcp-in)
(close-output-port tcp-out)
progname " [-u/--user UID] [-g/--group GID] hostname [[port [spooldir]]\n"
"\n"
"The -u and -g options can be used to set the UID and GID of the process\n"
"following the creation of the TCP port listener (which often requires root)."))
progname " [-u/--user UID] [-g/--group GID] hostname [[port [spooldir]]\n"
"\n"
"The -u and -g options can be used to set the UID and GID of the process\n"
"following the creation of the TCP port listener (which often requires root)."))
(define (main)
(let ((progname (pathname-file (car (argv))))
(config (make-config "" 25 "/var/spool/mail" '() '())))
(define (main)
(let ((progname (pathname-file (car (argv))))
(config (make-config "" 25 "/var/spool/mail" '() '())))