Logging erors on Forms

Just needing some information.

I am sure most of us at some time have come across the situation where a website you have created with a contact form seems to always be working perfectly, and you are getting emails when people submit the form etc.

Then you either get your client saying they had a person tell them that they could not use your contact form because it was giving errors or just not working, or you see emails come through to the direct address for the client saying, i emailed this to you because your contact form was giving me troubles. Well after the client has informed you of this and you have done a few tests, each with perfect results, do you figure out why SOME people are having issues and others are not.

Is there a server log file, or some way to look back at a particular time frame for what errors your website has encountered regarding form submissions.

Here is an example, i found a form today on a secure site that is live, where my client inputs many fields of data, one of those fields is email. Yet they can not input some email addresses and others they can, I assume this is some kind of formatting error. Email addresses like this will not submit from the email field though.
john.doe@domain.tld or johndoe53@gmail.com or johndoe38@yahoo.co.uk

If anyone else here with a simple contact form that writes to a database could try these email addresses and see if they work for them i would appreciate it, and if anyone can give me some idea of how i could debug an error 2 days after i am told the form had a problem.

I have problems like this from time to time. I try to get the exact details and then enter them myself - in case some validation rules are causing some problem with some unexpected characters in a name or address etc.

If the form normally works, then it’s not likely to an error recorded up by the server, but nevertheless I usually check the error.log in the relevant folder on the server (if this has been set up). I’ll also download the server logs if more investigation is needed.

cPanel has a very useful delivery tracking feature. You can view mail deliveries which are successful, deferred, failed or in-progress. Deferred delivery results in people contacting me from time to time. I think it’s becoming more common. If mail hasn’t been received from a particular email address before, some servers are set up to ‘greylist’ these messages for a short period before letting them through.

Sometimes I think there may be more problems with generic email addresses. I quite often see a message asking you to use a ‘business’ email address (as opposed to a gmail/yahoo type addresses presumably).

Anyway, good luck tracking down the problem. I’m afraid I’m not an expert but I come across such problems from time to time.

1 Like

Hello Paul,
Are there any validation errors or errors in the action file, or is it your mail server not processing emails like this?
If it is your mail server refusing this kind of addresses you should look into its error logs.

1 Like

Thanks @TomD and @Teodor for the feedback, here is some added information on this.
Unfortunately it is difficult to get more information from the client as normally it is the telephone operator at my clients business getting the complaint and most of the time they just apologise for the inconvenience and move on.
I turned off all form validation and still found this to be an issue, which was strange.
Then I tried turning off my CDN on this particular website and suddenly it all worked, it looks like StackPath was adjusting headers as it was processing and looking for spam email addresses, or blacklisted domains in its firewall settings and then injecting additional headers.
Unfortunately this is quite a complex hosting setup for this domain

The domain is on an American VPS > DNS hands of email to Google for Business > DNS hands off one subdomain to Wetu a travel application with a custom URL > DNS hands off the main domain to my CDN StackPath.
Google for Business hands off the SMTP portion of transactions to BlackPearlMail so they can insert email signatures for the company on the fly.
It seems that the CDN is causing most of the trouble here, something about the referer policy being set to no-referer-when-downgrade.

1 Like