bennn / racket-mutt

Racket API for the Mutt email client
Other
3 stars 1 forks source link

`mutt` fails with attachment provided as path #25

Closed jasonhemann closed 1 year ago

jasonhemann commented 1 year ago

I see the following error when trying to send mail w/an attachment.

 (mutt "" #:to "test@example.com" #:attachment (build-path "./test"))
; string-join: contract violation
;   expected: (listof string?)
;   given: '(#<path:./test>)
; Context (errortrace):
;    create-scores-hash.rkt:64:0: (mutt "" #:to "test@example.com" #:attachment (build-path "./test"))

I believe mutt is expecting the attachments as path strings. But by the time we get to formatting, we seem to be expecting only strings, since we're doing a string-join. Maybe some special casing around here?

bennn commented 1 year ago

Pushed a fix. Thanks for the report!