Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PLAIN AUTH SMTP work with long username/passwords. #364

Merged
merged 1 commit into from
Sep 11, 2012
Merged

Make PLAIN AUTH SMTP work with long username/passwords. #364

merged 1 commit into from
Sep 11, 2012

Conversation

cstorey
Copy link
Contributor

@cstorey cstorey commented Sep 10, 2012

As it stands, the smtpclient protocol uses Array#pack to base64 encode data, which wraps the output at 60-characters (as you would when sending base64-encoded mail). However, the AUTH SMTP extension expects the initial authentication string to be a single line.

This is a particular issue when using credentials for Amazon's simple email service, which tend to be quite long (>64 characters combined).

Is this okay to be merged as is, or is there anything else you'd need me to do first?

@ibc
Copy link
Contributor

ibc commented Sep 10, 2012

It's much better to use Base64::strict_encode64 which does not add \n.

@ibc
Copy link
Contributor

ibc commented Sep 10, 2012

Unfortunately Base64::strict_encode64 does not exist in Ruby 1.8.

tmm1 added a commit that referenced this pull request Sep 11, 2012
Make PLAIN AUTH SMTP work with long username/passwords.
@tmm1 tmm1 merged commit 82e9f62 into eventmachine:master Sep 11, 2012
@cstorey
Copy link
Contributor Author

cstorey commented Sep 11, 2012

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants