A pod to send emails with babashka
It's relying entirely on https://github.com/jordan-wright/email and so supports most of its features
(require '[babashka.pods :as pods])
(pods/load-pod 'tzzh/mail "0.0.2")
(require '[pod.tzzh.mail :as m])
(m/send-mail {:host "smtp.gmail.com"
:port 587
:username "[email protected]"
:password "kylian123"
:subject "Subject of the email"
:from "[email protected]"
:to ["[email protected]"]
:cc ["[email protected]"]
:text "aaa" ;; for text body
:html "<b> kajfhajkfhakjs </b>" ;; for html body
:attachments ["./do-everything.clj"] ;; paths to the files to attch
})
To use with gmail you need to allow less secure apps
For debugging set the environment variable POD_TZZH_MAIL_DEBUG=true
and the logs will show in stderr.