Question about empty emails with form (foundry 3)

Since I have re-done 4 websites with Foundry 3, I recieve totally empty emails from the contact-form.
I have tried to find how this is possible as there is at least one required field. I have found that some bots execute directly the stacks_in_XXX_fdy-form.php.
If I enter [site-url]/contact/files/stacks_in_XXX_fdy-form.php (ex. the success message without styling appears and I recieve a blank email.

What can I do to avoid this ?

Hmmm. It definitely should not send a blank email when visiting the PHP file as the form has to pass a special identifier token to the PHP file when the form is submitted. By chance did you submit an email through the form and then later visit the PHP file?

That’s what I thought.
But I have just tested with an other form on the same site. One I didn’t visit before and the result is the same.
As if when visiting directly the php file, there is no need of special identifier to send a blank email.

After lunch I’ll do some tests here. If you could share your project file in the event I need it that would be appreciated.

Think I have it sorted. Going to make a few changes, then will send you a test version to try out.

@annebourdon – Just sent you a direct message with a test version, along with install instructions, for you to try out.

1 Like

It seems to solve the problem. Perfect ! Thank you.

1 Like

Awesome. I was indeed checking for the token, but there was a slight mis-match in the code that could still let the form PHP send a blank email. Will get this out in the next update.