Skip to content

Commit

Permalink
Merge pull request #364 from cstorey/master
Browse files Browse the repository at this point in the history
Make PLAIN AUTH SMTP work with long username/passwords.
  • Loading branch information
tmm1 committed Sep 11, 2012
2 parents c0ccd91 + 77eee48 commit 82e9f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/em/protocols/smtpclient.rb
Expand Up @@ -271,7 +271,7 @@ def invoke_auth
psw = psw.call
end
#str = Base64::encode64("\0#{@args[:auth][:username]}\0#{psw}").chomp
str = ["\0#{@args[:auth][:username]}\0#{psw}"].pack("m").chomp
str = ["\0#{@args[:auth][:username]}\0#{psw}"].pack("m").gsub(/\n/, '')
send_data "AUTH PLAIN #{str}\r\n"
@responder = :receive_auth_response
else
Expand Down

0 comments on commit 82e9f62

Please sign in to comment.