mailcatcher/bin/mailcatcher
2010-10-25 08:52:06 +08:00

29 lines
552 B
Ruby
Executable File

#!/usr/bin/env ruby
$: << File.expand_path(File.join(File.dirname(__FILE__), '../lib'))
require 'mail_catcher'
require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = 'Usage: mailcatcher [options]'
options[:verbose] = false
opts.on('-v', '--verbose', 'Be more verbose') do
options[:verbose] = true
end
opts.on('-h', '--help', 'Display this help information') do
puts opts
exit
end
end.parse!
puts 'Starting mail catcher'
puts '==> smtp://0.0.0.0:1025'
puts '==> http://0.0.0.0:1080'
MailCatcher.run