Module: Mailpot
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/mailpot.rb
Defined Under Namespace
Modules: Configuration, Events, Mail
Classes: Smtp
Class Method Summary
collapse
Class Method Details
.quit! ⇒ Object
31
32
33
|
# File 'lib/mailpot.rb', line 31
def quit!
EventMachine.next_tick {EventMachine.stop_event_loop}
end
|
.run! ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/mailpot.rb', line 15
def run!
puts "Starting MailPot"
EventMachine.run do
rescue_port Mailpot::Configuration.smtp_port do
EventMachine.start_server Mailpot::Configuration.smtp_ip, Mailpot::Configuration.smtp_port, Smtp
puts "==> smtp://#{Mailpot::Configuration.smtp_ip}:#{Mailpot::Configuration.smtp_port}"
end
if Mailpot::Configuration.daemon === true
EventMachine.next_tick do
puts "*** Mailpot now runs as a daemon by default"
Process.daemon
end
end
end
end
|