Page 1 of 1

Blocking specific email in form builder

Posted: Fri Apr 29, 2016 5:53 pm
by Tricker
Hello everyone,

This is my first post on this forum and of course with a question. ;)

I want to block a specific email address from using a form. On my website you can give your email address and a standard email will be send with extra information. Unfortunately someone is using this to spam someone else. Blocking his ip doesn't work because he is using different ip-adresses. The best option is to put the e-mail address on a blacklist, but how do I do that?

Hopefully someone can help me.

Re: Blocking specific email in form builder

Posted: Sun May 01, 2016 12:11 pm
by Jos
I think there is no official way to do this, but most easy is to put some smarty in the Email Template area of the field that sends the email (check tab Advanced Settings in fieldsettings)

Code: Select all

{$blacklist='mail1@hotmail.co,mail2@gmail.co'}
{if $blacklist|strpos:$fb_email !== false}{redirect_url to=$sub_url}{/if}
Change $fb_email to the fieldalias that represents your emailfield.

What this does is when the email matches the blacklist, the user gets redirected back to the form, before the mail is sent.

Re: Blocking specific email in form builder

Posted: Mon May 02, 2016 6:41 pm
by Jeff
You can use an UDT to validate the form and put any custom checks that you want in it.