Method: Minbox::Cli::Application#server

Defined in:
lib/minbox/cli.rb

#server(host = "localhost", port = "25") ⇒ Object



30
31
32
33
34
35
36
# File 'lib/minbox/cli.rb', line 30

def server(host = "localhost", port = "25")
  publisher = Publisher.from(options[:output])
  server = Server.new(host: host, port: port, tls: options[:tls])
  server.listen! do |mail|
    publisher.publish(mail)
  end
end