Allow specification of port number in smtp config stanza in webchat example

This commit is contained in:
Tony Garnock-Jones 2017-02-21 15:01:11 -05:00
parent 6d8ced489c
commit e61dbf19f6
1 changed files with 6 additions and 1 deletions

View File

@ -46,4 +46,9 @@
(reloader-mixin* module-path))
(during (config _ (list 'smtp $h $u $p $m))
(assert (smtp-account-config 'smtp-service h #:user u #:password p #:ssl-mode m))))
(match h
[(regexp #px"(.*):(.*)" (list _ host port))
(assert (smtp-account-config 'smtp-service host #:port (string->number port)
#:user u #:password p #:ssl-mode m))]
[_
(assert (smtp-account-config 'smtp-service h #:user u #:password p #:ssl-mode m))])))