migrate lib/tasks/mail.rake for MidiSmtpServer 3
see https://midi-smtp-server.readthedocs.io/appendix_upgrade/
This commit is contained in:
parent
c7a74c8e7d
commit
952aecfb40
1 changed files with 2 additions and 2 deletions
|
@ -101,10 +101,10 @@ namespace :mail do
|
|||
|
||||
desc "Start STMP server for incoming email (options: SMTP_SERVER_PORT=2525, SMTP_SERVER_HOST=127.0.0.1)"
|
||||
task :smtp_server => :environment do
|
||||
port = (ENV['SMTP_SERVER_PORT'] || 2525).to_i
|
||||
port = ENV['SMTP_SERVER_PORT'] || '2525'
|
||||
host = ENV['SMTP_SERVER_HOST'] || '127.0.0.1'
|
||||
rake_say "Started SMTP server for incoming email on #{host}:#{port}."
|
||||
server = ReplyEmailSmtpServer.new(port, host)
|
||||
server = ReplyEmailSmtpServer.new(ports: port, hosts: host)
|
||||
server.start
|
||||
server.join
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue