Liking cljdoc? Tell your friends :D

hara.platform.mail.interop.body


bodyclj

(body arr)

converts a vector into a MimeMultiPart object

(body [{:type :attachment :description "hello there" :file "project.clj"} {:type :text :content-id "abc" :content-language ["en"] :text "Hello"}])

converts a vector into a MimeMultiPart object

(body [{:type :attachment
        :description "hello there"
        :file "project.clj"}
       {:type :text
       :content-id "abc"
        :content-language ["en"]
        :text "Hello"}])
raw docstring

body-readclj

(body-read b)

converts a MimeMultiPart object into a vector

(-> (body [{:type :text :text "Hello"}]) (body-read)) => (contains-in [{:type :text :content-type "text/plain" :content "Hello"}])

converts a MimeMultiPart object into a vector

(-> (body [{:type :text :text "Hello"}])
    (body-read))
=> (contains-in [{:type :text
                  :content-type "text/plain"
                  :content "Hello"}])
raw docstring

digestclj

(digest path)
(digest path algo)

creates a digest for a given file

(digest "project.clj") ;;=> "70d941a9d512251bdc95180ccf2441f3"

creates a digest for a given file

(digest "project.clj")
;;=> "70d941a9d512251bdc95180ccf2441f3"
raw docstring

partclj

(part m)

creates a MimeBodyPart from scratch

(part {:type :text :text "Hello"}) ;;=> #part{:content "Hello", :type :text, :size -1, ;; :content-type "text/plain", :line-count -1}

creates a MimeBodyPart from scratch

(part {:type :text :text "Hello"})
;;=> #part{:content "Hello", :type :text, :size -1,
;;         :content-type "text/plain", :line-count -1}
raw docstring

part-emptyclj

(part-empty)
(part-empty _)

creates an empty MimeBodyPart object

(part-empty) ;;=> #part{:size -1, :content-type "text/plain", :line-count -1}

creates an empty MimeBodyPart object

(part-empty)
;;=> #part{:size -1, :content-type "text/plain", :line-count -1}
raw docstring

part-exclusionsclj


part-read-methodsclj


part-write-methodsclj


set-fileclj

(set-file part file)

creates a MimeBodyPart object based upon :type

(-> (MimeBodyPart.) (set-file "project.clj") (object/to-data)) => (contains {:type :attachment, :file-name "project.clj", :content-type "text/plain"})

creates a MimeBodyPart object based upon `:type`

(-> (MimeBodyPart.)
    (set-file "project.clj")
    (object/to-data))
=> (contains {:type :attachment,
              :file-name "project.clj",
              :content-type "text/plain"})
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close