bin/rumble in rumble-0.5.1 vs bin/rumble in rumble-0.5.2

- old
+ new

@@ -24,19 +24,21 @@ require 'slop' require 'mail' require 'net/smtp/proxy' require_relative '../lib/rumble' require_relative '../lib/rumble/version' +require_relative '../lib/rumble/cli' begin args = [] config = File.expand_path('~/.rumble') if File.exist?(config) body = File.read(config) extra = body.split(/[\r\n]+/).map(&:strip) args += extra - puts "Found #{body.split(/\n/).length} lines in #{config}" + puts "Found #{body.split(/\n/).length} lines in #{config}: + #{extra.join("\n ")}" else puts "Default config file #{config} not found" end args += ARGV @@ -93,21 +95,27 @@ when 'smtp' raise '--host is required' unless opts[:host] raise '--port is required' unless opts[:port] raise '--user is required' unless opts[:user] raise '--password is required' unless opts[:password] + from = Mail::Address.new(opts[:from]) if opts[:proxy] scheme, host, port = opts[:proxy].strip.split(':') delivery_method Net::SMTP::Proxy::DeliveryMethod, { + domain: from.domain, address: opts[:host], port: opts[:port], proxy_address: "#{scheme}://#{host}", proxy_port: port.to_i, + authentication: 'plain', openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE, - enable_starttls_auto: true + enable_starttls_auto: true, + user_name: opts[:user], + password: opts[:password] } else delivery_method :smtp, { + domain: from.domain, address: opts[:host], port: opts[:port], user_name: opts[:user], password: opts[:password], enable_starttls_auto: true