Forum Moderators: DixonJones

Message Too Old, No Replies

Banning e-mail addresses in formmail

can you ban e-mail address from submitting formmail forms?

         

silentmikedotus

11:17 pm on Jan 7, 2005 (gmt 0)

10+ Year Member



I have done quite a bit of research on this, but still have come up empty: is it possible to ban certain e-mail addresses from being input into a formmail form?

For example, if I were to want to ban all yahoo.com addresses, and a user put a yahoo address in the form, could I prevent them from submitting it? Or, could I submit a certain address, such as user@adomain.com?

Any help would be appreciated. Thanks in advance!

DerekH

11:20 pm on Jan 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm no expert on this, but have a look at the London Perl Mongers version of FormMail, which seems to be a lot more secure and easier to customise...
DerekH

DerekH

11:22 pm on Jan 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, and Welcome to WebmasterWorld!

rocknbil

7:23 pm on Jan 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



@banned = ('.*@yahoo.com','.*@hotmail.com');
$banned = 0;

foreach $b (@banned) {
if ($qs{'email'} =~ /$b/i) {
$banned = 1; last;
&error('Email Address Banned');
}
}

Note the .* is "any email" @yahoo.com, etc.

moltar

7:53 pm on Jan 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



... post erased, i was wrong ...