migrate lib/tasks/mail.rake for MidiSmtpServer 3

see https://midi-smtp-server.readthedocs.io/appendix_upgrade/
new_user
JuliusR 12 months ago
parent c7a74c8e7d
commit 952aecfb40
  1. 4
      lib/tasks/mail.rake

@ -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…
Cancel
Save