Net::HTTPBadResponse: wrong status line: "220 email-smtp.amazonaws.com ESMTP SimpleEmailService-909942753 aSK3of4ybdKqba6CpB7f" #60

Open
pratikkalathiya opened this Issue Dec 22, 2014 · 6 comments

Projects

None yet

6 participants

@pratikkalathiya

Hi,
I got this error while executing below command. I tried a lot but can't figure it out.

ses = AWS::SES::Base.new(:access_key_id =>'MY20DIGITACCESSKEY',:secret_access_key =>'MYSECRETACCESSKEY',:server => 'email-smtp.eu-west-1.amazonaws.com')

ses.quota

Error is:

Net::HTTPBadResponse: wrong status line: "220 email-smtp.amazonaws.com ESMTP SimpleEmailService-909942753 Wfwzt4Zk5WWKpNsmFazj"

from /home/shreehari/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/http/response.rb:41:in `read_status_line'

@danishleo

+1. Anybody know what's going on here?

@pratikkalathiya

First you need to create IAM User on amazon.
http://docs.aws.amazon.com/general/latest/gr/getting-aws-sec-creds.html

then you can try

ses = AWS::SES::Base.new(:access_key_id =>'MY20DIGITACCESSKEY',:secret_access_key =>'MYSECRETACCESSKEY')
ses.quota

Let me know if this helped.

@cristiancvanega

Happens to me the same, my credentials are right, I configured a postfix server with the same credentials, any other suggestions?

thanks

Sorry for my English

@yyamano
yyamano commented Jun 19, 2015

@pratikkalathiya @danishleo @cristiancvanega Could you try with API endpoint instead of SMTP endpoint? I had the same error with the SMTP endpoint.

See https://docs.aws.amazon.com/ses/latest/DeveloperGuide/regions.html for the endpoint in your region.

@murthyteja

+1 for this issue. Anyone else got this working ?

@Ehekatl
Ehekatl commented Dec 11, 2015

I see the answer from #38, it's duplicated
It's because this library communicate with http endpoint, not the SMPT server
Just simply change the endpoint from email-smtp.eu-west-1.amazonaws.com to email.eu-west-1.amazonaws.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment