RakeMailer
Welcome to your new gem! This is a mailer gem to be used in rake tasks. Please see the usage section for simple setup instructions and how to use this gem.
Installation
Add this line to your application's Gemfile:
gem 'rake_mailer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rake_mailer
Usage
Create a rake_mailer.yml in config
development:
from: 'gemin.patel61@gmail.com'
emails: ['arjun.verma@gmail.com', 'kamal.soni@gmail.com']
file_path: 'tmp/rake_mailer'
display_system_info: true
Sample Rake Task will now look like
namespace :bug_fixes do
task test: :environment do
r = RakeMailer::FileWriter.new
users = User.all
r.file_writer("Total users found: #{users.count}")
r.close
end
end
This will create a file 1465113400_bug_fixes:test.txt and mail it as an attachment.
Email settings will be used from rake_mailer.yml
Must configure your application.rb or enviroments 'rb' files with action mailer setting.
During initialization you can pass in 1 optional parameter for emails. It will over ride the default email list of config file.
Contributing
We are looking forward for good contributors. Please check out our github page or mail us to get in touch.