aheckmann / node-ses

An Amazon SES api for nodejs with proper error handling.
http://aheckmann.github.com/node-ses
MIT License
200 stars 37 forks source link

The request signature we calculated does not match the signature you provided. #18

Closed gmartini20 closed 9 years ago

gmartini20 commented 9 years ago

I'm sending an email using the following code:

client.sendemail({
    to: [ data.to.split( ',' ) ],
    from: data.from,
    subject: data.subject,
    message: data.html,
    altText: data.text
  }, function( err, data, res ) {
    console.log( 'sent with success -->', err, data, res );
    if ( err ) {
      callbacks.error();
    } else {
      callbacks.success();
    }
  });

and i'm getting the following output:

sent with success --> { Type: 'Sender',
  Code: 'SignatureDoesNotMatch',
  Message: 'The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.' } undefined undefined

My key and my secret are correct, is it possible to be an error on the module or I'm doing something wrong?

markstos commented 9 years ago

I suspect you are doing something wrong. Set DEBUG=node-ses in your environment and try again.

Reference: https://www.npmjs.com/package/debug

It's working for me. Re-open if your debugging pinpoints in a bug in node-ses.

markstos commented 9 years ago

If it's helpful, I added some more detailed debugging documentation to our README:

https://github.com/aheckmann/node-ses#debugging