Liking cljdoc? Tell your friends :D

spirit.mail.common


from-stringclj

(from-string s)

converts a string into a Message object

(-> (message/message {:from "a@a.com" :to ["b@b.com"] :body "HELLO WORLD"}) (to-string) (from-string) (object/to-data)) => (contains {:from "a@a.com" :to ["b@b.com"] :body "HELLO WORLD"})

converts a string into a Message object

(-> (message/message {:from "a@a.com"
                      :to ["b@b.com"]
                      :body "HELLO WORLD"})
    (to-string)
    (from-string)
    (object/to-data))
=> (contains {:from "a@a.com"
              :to ["b@b.com"]
             :body "HELLO WORLD"})
raw docstring

to-stringclj

(to-string message)
(to-string message ignore)

converts a Message object into a string

(-> (message/message {:from "a@a.com" :to ["b@b.com"] :body "HELLO WORLD"}) (to-string ["Date" "Message-ID" "Content-Transfer-Encoding" "Content-Type"]) (string/split-lines)) => ["From: a@a.com" "To: b@b.com" "MIME-Version: 1.0" "" "HELLO WORLD"]

converts a Message object into a string

(-> (message/message {:from "a@a.com"
                      :to ["b@b.com"]
                      :body "HELLO WORLD"})
    (to-string ["Date" "Message-ID" "Content-Transfer-Encoding" "Content-Type"])
    (string/split-lines))
=> ["From: a@a.com"
   "To: b@b.com"
    "MIME-Version: 1.0"
    ""
    "HELLO WORLD"]
raw docstring

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

× close