Mail::Tester
A simple gem to test mail server config
Installation
Add this line to your application's Gemfile:
gem 'mail_tester'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mail_tester
Usage
@test = Mail::Tester::MailTester.new(@config['email_adress'], @config['password'])
(, nb) = @test.check_mail
# message give you text return by server
# nb give you number of message store on server
(result, id) = @test.check_smtp
# result give you message return by smtp server
# id is the message id send by smtp server
Testing
- Clone it
- Copy config.yml-sample to config.yml
- Replace with your values in config.yml (dum_mail is a account with no mail)
- "bundle exec rspec" launch Specs
- "bundle exec guard" launch Guard with reload when modify files
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request