Closed calebbrewer closed 9 years ago
Not off hand. Try googling that error code or generating a stack trace to see which code is generating that error. Re-open if it appears to be a bug in node-ses. You can try using console.trace
instead of console.log
for that purpose.
https://nodejs.org/api/console.html#console_console_trace_message
You could also try routing the request through a debugging proxy like the Charles Debug Proxy to check the raw HTTP request and response sent and received from Amazon. Does the request look valid? Does it match Amazon's spec for their SES API? What does the raw response say?
Also, did you validate 'reminders@test.com' as a sender? It seems unlikely you control email at test.com
. Try sending again from from a verified sender or domain.
Likewise, try sending to a valid email address instead of one one at @test.com, which likely doesn't accept mail.
The issue is likely due to the fact that the amazon server url you used is the one for the SMTP API, not the HTTP API. (You receive SMTP responses that cant be understood by node hence the error).
So you should fix your server url, replace email-smtp
by just email
.
I just spent a lot of hours on this issue in my project since no tool can help you at this point. I just found by testing my credentials with postman and searching for the errors postman managed to print. These were SMTP errors that gave a clue of what was going on.
@joIivier Thanks for sharing your finding of the root case!
I'm getting [Error: Parse Error] bytesParsed: 0, code: 'HPE_INVALID_CONSTANT' when I run this:
Any thoughts?