bamboo v0.6.0 Bamboo.EmailPreviewPlug

A plug that can be used in your router to see delivered emails.

This plug allows you to view all delivered emails. To see emails you must use the Bamboo.LocalAdapter.

Using with Plug or Phoenix

# Make sure you are using Bamboo.LocalAdapter in your config
config :my_app, MyApp.Mailer,
  adapter: Bamboo.LocalAdapter

# In your Router
defmodule MyApp.Router do
  use Phoenix.Router # or use Plug.Router if you're not using Phoenix

  if Mix.env == :dev do
    # If using Phoenix
    forward "/sent_emails", Bamboo.EmailPreviewPlug

    # If using Plug.Router, make sure to add the `to`
    forward "/sent_emails", to: Bamboo.EmailPreviewPlug
  end
end

Now if you visit your app at /sent_emails you will see a list of delivered emails.

Summary

Functions

Callback implementation for c:Plug.call/2

Callback implementation for c:Plug.init/1

Functions

call(conn, opts)

Callback implementation for c:Plug.call/2.

init(opts)

Callback implementation for c:Plug.init/1.