-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Symfony Amazon SES Mailer does not work(Authentication issue) #36956
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
Comments
Symfony 5.1 already includes a new implementation of the SES transport, which uses the v4 signature rather than the v2 one. So I'm closing this issue as being already solved by the next Symfony version. |
Note that support for the v2 signature depends on the region. Some newer regions support only v4. |
I tried it with Symfony 5.1 and got the same error. I checked the source code and it seems to me that it still uses the v2 signature. |
If you still facing this issue, you can fix it by installing a new lib |
This is the best solution |
This worked for me: |
since symfony 4.4 is still the last LTS, shouldn't this issue be resolved for symfony/amazon-mailer 4.4 ? |
Sorry to blow up the closed thread, but the reason I commented above is because amazon is currently phasing out signature 2 on SES by March 27 or so, so this current LTS 4.4 will NO LONGER WORK with ses, so I would think it should be fixed in 4.4 |
Unfortunately, there is no way we can fix it in 4.4 as we never add a new feature in patch releases (and supporting this new feature is non trivial anyway). So, the only possibilities I see here is to upgrade to a newer version of Symfony or to switch to another email provider (or maybe try to upgrade only symfony/amazon-mailer to 5.2). |
OK. |
This PR was merged into the 4.4 branch. Discussion ---------- add a warning about Amazon SES signature We need to warn users of Symfony 4.4 that they can't use symfony/amazon-mailer anymore. They need to upgrade to 5.1 or newer. See symfony/symfony#36956 (comment) Commits ------- 518926f add a warning about Amazon SES signature
Sorry to bump old issue, but I just hit this problem again (even if I have a similar configuration working).
The error is the infamous "The request signature we calculated does not match the signature you provided" if I use The only difference I can see for config is that I have a |
@garak Can you please bump amazon-mailer to the latest 5.2 release? |
@derrabus thanks for your suggestion: tried with amazon-mailer 5.2.6, no luck :-( |
If you use DSN, could you please check that the credentials are encoded? AWS, often generates KEYs and SECRETs with special chars like |
@jderusse already mentioned above: "password urlencoded" |
Having After using the SMTP transport in debug mode, the |
I now tried again with |
Just in case someone as issue this is what I am doing (in pseudo codish way).
Since it's using simple smtp transport you don't need to install the symfony/amazon-mailer There might be some things specific to our infra (I am not handling it) but this would give a decent starting point |
The missing puzzle piece was urlencode the password, as it contained special char "/". |
Symfony version(s) affected: Symfony 5.0.8
Description
Symfony Amazon SES mailer not sending emails.
Deprecated signature is used, we should migrate to Signature Version 4 signing process
Unable to send an email: The security token included in the request is invalid. (code 0).
Response from amazon
it seems like they do not support V3 Authentication anymore, or something else. I tried with multiple different credentials and still, it does not work.
How to reproduce
Config
Possible Solution
Change Authentication to v4
Additional context
I tried to send emails with
amazon PHP sdk
it does work, they are using V4 authorization(for more than two years).
The text was updated successfully, but these errors were encountered: