Skip to content

tzzh/pod-tzzh-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pod-tzzh-mail

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

Usage

(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

Debugging

For debugging set the environment variable POD_TZZH_MAIL_DEBUG=true and the logs will show in stderr.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages