diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Revision history for newsletter-mailgun
+
+## 0 -- 2019-05-06
+
+* First version. Released on an unsuspecting world.
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,30 @@
+Copyright (c) 2019, davean
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of davean nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/newsletter-mailgun.cabal b/newsletter-mailgun.cabal
new file mode 100644
--- /dev/null
+++ b/newsletter-mailgun.cabal
@@ -0,0 +1,46 @@
+cabal-version:       2.2
+-- Initial package description 'newsletter-mailgun.cabal' generated by
+-- 'cabal init'.  For further documentation, see
+-- http://haskell.org/cabal/users-guide/
+
+name:                newsletter-mailgun
+version:             0
+synopsis:            A mailgun backend for the newsletter package.
+description:
+  This package provides a backed to based on
+  <mailgun https://hackage.haskell.org/package/mailgun> for
+  <newsletter https://hackage.haskell.org/package/newsletter>.
+  .
+  Subscription storage in addition to mailing is deligated to
+  <mailgun.com https://www.mailgun.com/>.
+homepage:            https://oss.xkcd.com/
+license:             BSD-3-Clause
+license-file:        LICENSE
+author:              davean
+maintainer:          oss@xkcd.com
+copyright:           Copyright (C) 2019 davean
+category:            Email
+extra-source-files:  CHANGELOG.md
+
+source-repository head
+  type: git
+  location: https://code.xkrd.net/haskell/newsletter.git
+
+common deps
+  build-depends:
+      base       ^>=4.12.0.0
+    , exceptions ^>= 0.10
+    , lens       ^>= 4.17
+    , machines   ^>= 0.6
+    , mailgun    ^>= 0.2
+    , mime-mail  ^>= 0.5
+    , mtl        ^>= 2.2
+    , newsletter ^>= 0
+    , text       ^>= 1.2
+
+library
+  import: deps
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  exposed-modules:
+    Network.Mail.Newsletter.Mailgun
diff --git a/src/Network/Mail/Newsletter/Mailgun.hs b/src/Network/Mail/Newsletter/Mailgun.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/Mail/Newsletter/Mailgun.hs
@@ -0,0 +1,49 @@
+{-# LANGUAGE DerivingVia #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeFamilies #-}
+module Network.Mail.Newsletter.Mailgun where
+
+import           Control.Lens
+import           Control.Monad.Catch
+import           Control.Monad.Reader
+import           Data.Machine
+import           Data.Machine as M
+import           Data.Text (Text)
+import           Network.Mail.Mime
+import qualified Network.Mail.Mailgun as MG
+import           Network.Mail.Newsletter.Class
+
+data MailgunNewsletterContext
+ = MGNL
+   { _mgnlMailgunContext :: MG.MailgunConfig
+   , _mgnlName :: Address
+   }
+
+makeLenses ''MailgunNewsletterContext
+
+instance MG.HasMailgunConfig MailgunNewsletterContext where
+  mailgunConfig = mgnlMailgunContext
+
+newtype MailgunNewsT m a =
+    MailgunNewsT { runMailgunNewsT :: MailgunNewsletterContext -> m a }
+  deriving (Functor, Applicative, Monad, MonadIO, MonadThrow, MonadCatch
+           ,MonadReader MailgunNewsletterContext)
+     via (ReaderT MailgunNewsletterContext m)
+  deriving (MonadTrans)
+     via (ReaderT MailgunNewsletterContext)
+
+instance (MonadIO m, MonadThrow m) => Newsletter (MailgunNewsT m) where
+  subscribe   = M.mapping (\(addr, d) ->
+                  MG.ListMember (maybe "" id . addressName $ addr) (addressEmail addr) True d) ~>
+                preplan ((fmap (const ())) <$> ((MG.addMembers False . addressEmail) <$> view mgnlName))
+  unsubscribe = M.mapping addressEmail ~>
+                preplan (autoM <$> ((MG.removeMember . addressEmail) <$> view mgnlName))
+  subscribers = preplan ((MG.listMembers (Just True) . addressEmail) <$> view mgnlName) ~>
+                M.mapping (\(MG.ListMember mn addr _ d) ->
+                  (Address (if mn=="" then Just mn else Nothing) addr, d))
+  sendEmail mkMail = do
+    ml <- view mgnlName
+    void $ MG.send Nothing [ml] (mkMail ml)
+  sendSubscribe newUser mkMail =
+    join $ void . MG.send Nothing [newUser] <$> (mkMail <$> view mgnlName)
