I have automation tests that run on my site every night to test that the site loads, displays certain key bits of text and fills in and sends a contact form.

Today the test ran and passed but we did not receive the contact form messages from the website.

Turns out that our mail server had been blocked as there were too many bounced mails being sent. Bots had been using the contact form to send spam.

The solution to this is reCapatcha which I have added to the site... The problem now is that my automation tests (obviously) fail.

Are there any solutions to this? If it weren't for the automation tests it might have been a long time before I realised that my mail server was not working and I could have missed a lot of of business.


1 Answer 1


The obvious solution is to exempt the IP addresses associated with your testing server.

Also (not in direct answer to your problem, but maybe useful) depending on how you send email you may want to monitor your mail queue and/or the number of emails being sent per period from your webserver. This can give you indications as to when abuse is taking place and act almost pre-emptively.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.