(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"}])
(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"}])
(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"
(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}
(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}
(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"})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close