Password reset causes 504 error

When I try to do a password reset I am getting a 504 error. I cannot find any concrete errors as it’s an Ajax call. I have tried everything but nothing works

  1. Changed STMP credentials to

  2. Tried locally and it works (using Valet nginx)

  3. Reverted back to default nginx config on production

  4. Tried this Kirby->Email / SMTP Error (Timeout?) - #6 by ahmetbora

  5. Tried this Problems with e-mail - #3 by Adspectus

Using php8.1 and on Kirby 3.8.3k.

Any tips?

Much appreciated

Sorry for bumping this but still no luck figuring this out. I am not getting any errors. Nothing in the logs either.

Does email work if you try it in a template with the same transport settings?

Sorry for late reply. Notification was off and then holiday.

Thank you for replying.

I have now tried this Emails | Kirby CMS but I am getting a 504 when loading the page that uses the template in which I have added that code from the docs. I am using 2 different type of email hosts. Mailgun and Mailtrap. Both works locally. Both gives 504 on server.