(base-url domain)
Returns the base mailgun api url
Returns the base mailgun api url
(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
(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
(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
(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
(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
(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
(get-stored-events {:keys [domain key]})
Returns stored events
Returns stored events
(get-stored-message {:keys [domain key]} message-key)
Returns a stored message given the message-key
Returns a stored message given the message-key
(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
(parse-message message-body)
Parse the message from mailgun to basic message tags
Parse the message from mailgun to basic message tags
(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")]})
(send-with-region region & params)
(validate-message message-content)
Check if the message map has the minimum required fields
Check if the message map has the minimum required fields
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close