No commit activity in last 3 years
No release in over 3 years
Hato plugin to send messages via email
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

>= 0
>= 0
 Project Readme

Hato::Plugin::Mail BuildStatus

This plugin provides a method to send messages via mail.

Configuration

Hato::Config.define do
  api_key 'test'
  host    '0.0.0.0'
  port    9699

  # ...

  tag 'test' do
    plugin 'Mail' do
      smtp address:   'smtp.example.com',
           port:      587,
           domain:    'example',
           user_name: 'hato',
           password:  'password',
           enable_ssl: true

      subject_template = <<EOS
[<%= args[:tag] %>] Notification
EOS
      body_template = <<EOS
You've got a message:

<%= args[:message] %>
EOS

      message from: 'hato@example.com',
              to:   [
                'foo@example.com',
                'bar@example.com',
              ],
              subject_template: subject_template,
              body_template:    body_template
    end
  end

  # ...
end

Installation

Add this line to your application's Gemfile:

gem 'hato-plugin-mail'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hato-plugin-mail

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request