#!/usr/bin/perl -w # email_link - display an obfuscated email address # History: # 2005/02/14 DT Add f(ilter) option. # 2005/02/05 DT Start require 5; require "./form.pl"; # get the query into usable form $rfield = &form_function; if (defined $rfield->{'d'} && defined $rfield->{'e'} && defined $rfield->{'n'}) { my $domain = shift @{$rfield->{'d'}}; my $email = shift @{$rfield->{'e'}}; my $filter = shift @{$rfield->{'f'}} || ''; my $name = shift @{$rfield->{'n'}}; if ($filter) { my $filter_len = length $filter; $filter = <<"EOF";
In order to get through the spam filter, you must include the string $filter anywhere in the Subject: line of your message. Any message NOT containing that exact $filter_len-character ASCII string somewhere in the Subject: line will be summarily discarded.
EOF } print <<"EOF"; Content-type: text/htmlTo send a message to $name, use the following address:
$name < @ $domain >
The above address has been deliberately obfuscated to frustrate spammers, and a simple copy-and-paste will probably not work. You must retype the address as shown into your mail program.
$filterUse your browser's "back" button to return.
EOF #' } else { error ("invalid request"); } sub error { my ($string) = @_; print <<"EOF"; Content-type: text/html