Liking cljdoc? Tell your friends :D

mailgun.mail


*base-url*clj


base-urlclj

(base-url domain)

Returns the base mailgun api url

Returns the base mailgun api url
raw docstring

download-attachmentclj

(download-attachment {:keys [key]} url)

Download attachment from message stored in mailgun providing login credentials and attachment mailgun url

Download attachment from message stored in mailgun providing login credentials
and attachment mailgun url
raw docstring

gen-authclj

(gen-auth password)

Returns the basic authentication with the mailgun api key as password

Returns the basic authentication with the mailgun api key as password
raw docstring

gen-bodyclj

(gen-body {:keys [attachment] :as params})

Build the request body that has to be sent to mailgun, it could be a map of simple form-params or could be a multipart request body. If the request has one or more attachments then the it would be a multipart else it would be a form-param

Build the request body that has to be sent to mailgun, it could be a map of simple form-params
or could be a multipart request body. If the request has one or more attachments then the
it would be a multipart else it would be a form-param
raw docstring

gen-message-urlclj

(gen-message-url route message-key domain)

Generate the mailgun url to get a message with a message-key

Generate the mailgun url to get a message with a message-key
raw docstring

gen-multipartclj

(gen-multipart {:keys [attachment] :as params})

Generate the multipart request param incase the request has an attachment

Generate the multipart request param incase the request has an attachment
raw docstring

gen-urlclj

(gen-url route domain)

Build the mailgun url based on the mailgun domain and the end route. Eg : (build-url "/messages" "foo.org" ) => https://api.mailgun.net/v3/foo.org/messages

Build the mailgun url based on the mailgun domain and the end route.
Eg : (build-url "/messages" "foo.org" )
   => https://api.mailgun.net/v3/foo.org/messages
raw docstring

get-stored-eventsclj

(get-stored-events {:keys [domain key]})

Returns stored events

Returns stored events
raw docstring

get-stored-messageclj

(get-stored-message {:keys [domain key]} message-key)

Returns a stored message given the message-key

Returns a stored message given the message-key
raw docstring

parseclj

(parse key-vec message-body)

Pares the message-body based on the vector of keys given as input

Pares the message-body based on the vector of keys given as input
raw docstring

parse-messageclj

(parse-message message-body)

Parse the message from mailgun to basic message tags

Parse the message from mailgun to basic message tags
raw docstring

regionsclj


send-mailclj

(send-mail {:keys [domain key] :as creds} message-content)

Send email to mailgun with the passed creds and the content

A sample request would look like (send-mail {:key "key-3ax6xnjp29jd6fds4gc373sgvjxteol1" :domain "bar.com"} {:from "no-reply@bar.com" :to "someone@foo.com" :subject "Test mail" :html "Hi ,</br> How are you ?" :attachment [(clojure.java.io/file "path/to/file")]})

Send email to mailgun with the passed creds and the content

A sample request would look like
(send-mail {:key "key-3ax6xnjp29jd6fds4gc373sgvjxteol1" :domain "bar.com"}
           {:from "no-reply@bar.com"
            :to "someone@foo.com"
            :subject "Test mail"
            :html "Hi ,</br> How are you ?"
            :attachment [(clojure.java.io/file "path/to/file")]})
raw docstring

send-with-regioncljmacro

(send-with-region region & params)

validate-messageclj

(validate-message message-content)

Check if the message map has the minimum required fields

Check if the message map has the minimum required fields
raw docstring

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

× close