Blocking specific email in form builder

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
Tricker
New Member
New Member
Posts: 1
Joined: Fri Apr 29, 2016 5:16 pm

Blocking specific email in form builder

Post 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.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Blocking specific email in form builder

Post 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.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: Blocking specific email in form builder

Post by Jeff »

You can use an UDT to validate the form and put any custom checks that you want in it.
Locked

Return to “Modules/Add-Ons”