Bug #3205
closedProblem with recent update to lib/net/smtp.rb rcptto_list method
Description
=begin
Looks like recent update to lib/net/smtp.rb rcptto_list method uses unknown/undeclared variable name 'ok_addrs' instead of 'ok_users' which causes an exception when trying to send mail on line 842. See snippet below:
def rcptto_list(to_addrs)
raise ArgumentError, 'mail destination not given' if to_addrs.empty?
ok_users = []
unknown_users = []
to_addrs.flatten.each do |addr|
begin
rcptto addr
rescue SMTPAuthenticationError
unknown_users << addr.dump
else
ok_users << addr
end
end
raise ArgumentError, 'mail destination not given' if ok_addrs.empty? #<= undeclared variable name 'ok_addrs', appears that it should be 'ok_users'
ret = yield
unless unknown_users.empty?
raise SMTPAuthenticationError, "failed to deliver for #{unknown_users.join(', ')}"
end
ret
end
=end
Updated by nobu (Nobuyoshi Nakada) over 15 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r27512.
Daniel, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end