Liking cljdoc? Tell your friends :D

mailgun.mail


base-urlclj

(base-url domain)

Returns the base mailgun api url

Returns the base mailgun api url
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw docstring

get-stored-eventsclj

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

Returns stored events

Returns stored events
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw docstring

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")]})
sourceraw docstring

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
sourceraw docstring

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

× close