Welcome to mailgun’s documentation!

This library provides an easy way to send transactional emails through http://mailgun.com.


You don’t have to setup your own SMTP servers!

And they have a “free” plan with 10000 emails per month.


Previously, I used this code in one of my projects, but seems this functionality needed almost in any serious web application. So, I decided to make it available as a separate library.

Here is how to use it

First, setup an account at http://mailgun.com. You need to add your domain there and to reveive an authentication token.

(setf mailgun:*domain* "mail.skazorama.ru")
(setf mailgun:*api-key* "key-************************")

(mailgun:send ("noreply@skazorama.ru"
               "Mail subject")
  (:h1 "This is a test letter")
  (:p "It is in a HTML format and supports some tags"
      "For example, I can make " (:b "a bold text") ".")
  (:p "And here we have some items, passed to the template:")
   (loop for item in items
         do (mailgun:htm
             (:li item)))))


  • Add support for styles, build them with LASS and embed into an email’s markup.


Indices and tables