Sha256: d5dd158af78d01184e875ead979a7844ea47792c12a37c78acbd6cdba2f3266e

Contents?: true

Size: 1.66 KB

Versions: 1

Compression:

Stored size: 1.66 KB

Contents

# Emailbutler
Simple email tracker for Ruby on Rails applications.
Emailbutler allows you to track delivery status of emails sent by your app.

## Installation

Add this line to your application's Gemfile:
```ruby
gem 'emailbutler'
```

And then execute:
```bash
$ bundle install
$ rails g emailbutler:active_record
$ rails db:migrate
```

## Engine configuration

### Initializer

Add configuration line to config/initializers/emailbutler.rb:

#### ActiveRecord

```ruby
require 'emailbutler/adapters/active_record'

Emailbutler.configure do |config|
  config.adapter = Emailbutler::Adapters::ActiveRecord.new
  config.ui_username = 'username'
  config.ui_password = 'password'
  config.ui_secured_environments = ['production']
end
```

### Routes

Add this line to config/routes.rb
```ruby
mount Emailbutler::Engine => '/emailbutler'
```

### Mailers

Update you application mailer
```ruby
class ApplicationMailer < ActionMailer::Base
  include Emailbutler::Mailers::Helpers
end
```

### Email provider webhooks settings

#### Sendgrid

- go to [Mail settings](https://app.sendgrid.com/settings/mail_settings),
- turn on Event Webhook,
- in the HTTP POST URL field, paste the URL to webhook controller of your app,
- select all deliverability data,
- save settings.

## Usage

1. Each event with sending email will create new record with message params in database.
2. Each webhook event will update status of message in database.

### UI

Emailbutler provides UI with rendering email tracking statistics - /emailbutler/ui/dashboard.
And with opportunity to resend emails.

## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
emailbutler-0.3.0 README.md