diff --git a/lib/postal/smtp_server/client.rb b/lib/postal/smtp_server/client.rb index 10e54f8..2f01e74 100644 --- a/lib/postal/smtp_server/client.rb +++ b/lib/postal/smtp_server/client.rb @@ -18,7 +18,7 @@ module Postal else @state = :preauth end - reset + transaction_reset end def check_ip_address @@ -34,11 +34,6 @@ module Postal @headers = nil end - def reset - @credential = nil - transaction_reset - end - def id @id ||= Nifty::Utils::RandomString.generate(:length => 6).upcase end @@ -130,7 +125,7 @@ module Postal def ehlo(data) resolve_hostname @helo_name = data.strip.split(' ', 2)[1] - reset + transaction_reset @state = :welcomed ["250-My capabilities are", Postal.config.smtp_server.tls_enabled? && !@tls ? "250-STARTTLS" : nil, "250 AUTH CRAM-MD5 PLAIN LOGIN", ] end @@ -138,13 +133,13 @@ module Postal def helo(data) resolve_hostname @helo_name = data.strip.split(' ', 2)[1] - reset + transaction_reset @state = :welcomed "250 #{Postal.config.dns.smtp_server_hostname}" end def rset - reset + transaction_reset @state = :welcomed '250 OK' end