
Hi everyone,
I'm having issues with sending email through Amazon SES. I'm using the
*Network.Mail.Mime.SES* package. The error I get is:
*email-test-exe: SESException {seStatus = Status {statusCode = 403,
statusMessage = "Forbidden"}, seCode = "SignatureDoesNotMatch", seMessage =
"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.", seRequestId =
"8ceb250a-0dd3-11e6-892c-4fb1a14d4732"}*
What's confusing is that I'm using the same SES settings in a Rails app as
well as a small Rust console program without any issues (it works from the
same machine too). The only thing I can think of is that with this Haskell
package, I haven't found where to set certain things like the port number
(587) and so maybe it's that? Here is a small sample app that illustrates
the problem. What am I missing? Thanks.
*{-# LANGUAGE OverloadedStrings #-}{-# LANGUAGE QuasiQuotes #-}*
*module Main where*
*import Data.Function ((&))import GHC.Genericsimport
Network.HTTP.Clientimport Network.HTTP.Client.TLSimport
Network.Mail.Mimeimport Network.Mail.Mime.SESimport Text.Hamlet
(shamlet)import Text.Blaze.Html.Renderer.String (renderHtml)import
qualified Data.ByteString.Char8 as C8import qualified Data.Text as Timport
qualified Data.Text.Lazy as LTmain :: IO ()main = do manager <- newManager
tlsManagerSettings let sesConfig = SES { sesFrom = C8.pack
"de@somewhere.com