Skip to content

lamuria/clj-mailgun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clj Mailgun Build Status

Clojars Project

A Clojure Wrapper to Mailgun API.

Installation

clj-mailgun is available as a Maven artifact from Clojars

With Leiningen/Boot:

[clj-mailgun "0.2.0"]

Usage

The functionalities are provided by the clj-mailgun.core namespace.

First, require it in the REPL:

(require '[clj-mailgun.core :as mailgun])

Or in your application:

(ns my-app.core
  (:require [clj-mailgun.core :as mailgun]))

Here's how to send a message using the library:

(defn example-of-send-email
  []
  (let [credentials {:api-key "YOUR_API_KEY" :domain "YOUR_DOMAIN"}
        params {:from "FROM_EMAIL" :to "TO_EMAIL" :subject "YOUR_SUBJECT" :text "YOUR_TEXT"}]
    (mailgun/send-email credentials params)))

Here's how to validate emails using the library:

(defn example-of-validate-email
  []
  (let [credentials {:api-key "YOUR_API_KEY"}
        email "[email protected]"]
    (mailgun/validate-email credentials email)))

License

Copyright © 2015 FIXME

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Releases

No releases published

Packages

No packages published