Permalink
Browse files

Merge pull request #364 from cstorey/master

Make PLAIN AUTH SMTP work with long username/passwords.
  • Loading branch information...
2 parents c0ccd91 + 77eee48 commit 82e9f62200c33a115d963e29f7b6ada0a88e7aec @tmm1 tmm1 committed Sep 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/em/protocols/smtpclient.rb
@@ -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

0 comments on commit 82e9f62

Please sign in to comment.