Hello! I registered today here stackoverflow to ask the same question to everyone who can help, but is silent. This code was published back in 2020 - Google Recaptcha v3 example demo.
I integrated the code in 2022 into my static HTML site and sometimes it worked and sometimes it didn't. Error! The security token has expired or you are a bot. In 2024, he stopped sending emails with error codes altogether. http_response_code(500); / Something went wrong, your message could not be sent. / That means something has changed in Google's service Recaptcha v3. After all, it worked at first!
I have tried all the existing demo scripts from the internet and they all don't work! It happens sometimes - Thank You! Your message has been successfully sent. But the letters don't arrive. I send letters to the domain address for the Recaptcha. That is, the API key registration domain. All keys work.enter image description here
I am not an expert in this matter (It's too difficult!) and therefore I am looking for help from a specialist who could correct the code that was given above.