Log smtp-account startup and shutdown

This commit is contained in:
Tony Garnock-Jones 2016-11-24 10:38:36 +13:00
parent a3335800f6
commit 4af472f7ff
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,10 @@
(actor #:name 'smtp-account-driver
(during/actor (smtp-account-config $id $host $port $user $password $ssl-mode)
#:name (list 'smtp-account id)
(on-start
(log-syndicate/drivers/smtp-info "~v starting: ~s ~s ~s" id host user ssl-mode))
(on-stop
(log-syndicate/drivers/smtp-info "~v stopping: ~s ~s ~s" id host user ssl-mode))
(assert (smtp-account id))
(on (message (smtp-delivery id $delivery-id $from $to $header $lines))
(with-handlers [(exn:fail?