https://forums.modx.com/thread/?thread=102751
https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=3#dis-post-553427
I have a form which is using recaptchav2. The keys for recaptcha are configured in system settings. If I fill out all the fields without checking the recaptcha checkbox and press submit button, it gives me error on the form, that recaptcha was not checked. If I check the recaptcha and press the submit button, the situation is the same, at both situations I don't get an email. If I remove the hook recaptcha or place it before redirect hook, the emails are sent to me and saved in CMS.
So I want that my form requires all the fields and checking the recaptcha to make the form working. I'm not sure what is wrong in the code?
It might be worth creating a new topic for that query as this one is now marked as answered so people who check for support questions may not see this. Also it helps future users with the same issue.
I just don't want to open new discussions and spam everywhere...
Quote from: andytough at Sep 01, 2017, 12:43 PM
You may have to set gmail to allow 'connections from less secure apps'.
Although I see this is not possible if you have two factor authentication enabled for the the gmail account.
This option was already enabled, because the mails are sent on localhost, just not on live server, currently I'm in contact with host provider, maybe there are some firewall settings not allowing smtp go through... I'll report.
Although I see this is not possible if you have two factor authentication enabled for the the gmail account.]]>andytoughSep 01, 2017, 12:43 PMhttps://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553527
https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553526
]]>lkfranklinSep 01, 2017, 11:18 AMhttps://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553526
https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553525
Today I have set my smtp settings for gmail in system settings and guess what, mails are not sending due to error. But on localhost it is working. So i have checked different topics regarding that, it usually helps if you add a hook '&emailFrom' so I have added this, it is not working. Also i have installed QuickEmail package for better diagnosis. I have tried changing the tls/ssl 587/465 options
I get this error:
2017-09-01 11:11:12 SMTP ERROR: Failed to connect to server: Connection refused (111) ]]>unforgiven666Sep 01, 2017, 11:14 AMhttps://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553525
https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553519
Quote from: lkfranklin at Sep 01, 2017, 06:56 AM
Additionally I believe you also need to access localhost via 127.0.0.1 rather than 'localhost'
I have tried both options before, none of it was working :/]]>unforgiven666Sep 01, 2017, 08:43 AMhttps://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553519
https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553517
lkfranklinSep 01, 2017, 06:56 AMhttps://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553517
https://forums.modx.com/thread/102751/formit---recaptchav2-validation-problem-with-form?page=2#dis-post-553516
localhost domains are no longer supported by default. If you wish to continue supporting them for development you can add them to the list of supported domains for your site key. Go to the admin console to update your list of supported domains. We advise to use a separate key for development and production and to not allow localhost on your production site key.