Ok here is the whole script, and as I said this was generated bt Perbuilder
2.0 and the email part was generated by Code Magic.

#!C:/Perl/bin/perl.exe
use Net::SMTP;
# This script was generated automatically by Perl Builder(tm):
http://www.solutionsoft.com

# ***ENDAUTOGEN:HEADER*** Do NOT modify this line!!  You may enter custom
code after this line.


# ***AUTOGEN:INPUT*** Do NOT modify this line!! Do NOT enter custom code in
this section.

&GetFormInput;

# The intermediate variables below make your script more readable
# but somewhat less efficient since they are not really necessary.
# If you do not want to use these variables, clear the
# Intermediate Variables checkbox in the Tools | Options dialog box, CGI
Wizard tab.

$adminmail = '[EMAIL PROTECTED]';
$fname = $field{'fname'} ;
$lname = $field{'lname'} ;
$address = $field{'address'} ;
$city = $field{'city'} ;
$state = $field{'state'} ;
$zip = $field{'zip'} ;
$phone = $field{'phone'} ;
$email = $field{'email'} ;
$yes = $field{'yes'} ;
$no = $field{'no'} ;
$Submit = $field{'Submit'} ;

$message = "" ;
$found_err = "" ;

# ***ENDAUTOGEN:INPUT*** Do NOT modify this line!!  You may enter custom
code after this line.


# ***AUTOGEN:VALIDATE*** Do NOT modify this line!! Do NOT enter custom code
in this section.

$errmsg = "<p>Please enter a valid email address</p>\n" ;

if ($email !~ /.+\@.+\..+/) {
 $message = $message.$errmsg ;
 $found_err = 1 ; }

if ($found_err) {
 &PrintError; }


# ***ENDAUTOGEN:VALIDATE*** Do NOT modify this line!!  You may enter custom
code after this line.


# ***AUTOGEN:LOGFILE*** Do NOT modify this line!! Do NOT enter custom code
in this section.

# This will NOT work on your server unless you create the text file and set
the permissions: chmod 660 webhost.txt


open (LOGFILE, ">> webhost.txt") ;

#The commented flock() and seek() lines below will lock the log file to
prevent collisions from
#simultaneous users. However, flock() is probably not implemented in Perl
for Windows and will
#give you a fatal error. Uncomment these lines only if/when you move your
script to a Unix server.

#flock(LOGFILE, 2) ;     #LOCK - uncomment for locking on a Unix server.
#seek(LOGFILE, 0, 2) ;   #LOCK - uncomment for locking on a Unix server.
$datetime = localtime ;

print LOGFILE
"$fname\t$lname\t$address\t$city\t$state\t$zip\t$phone\t$email\t$yes\t$no\t$
datetime\n" ;

#flock(LOGFILE, 8) ;     #UNLOCK - uncomment for locking on a Unix server.

close (LOGFILE) ;


# ***ENDAUTOGEN:LOGFILE*** Do NOT modify this line!!  You may enter custom
code after this line.


# ***AUTOGEN:EMAIL*** Do NOT modify this line!! Do NOT enter custom code in
this section.


$recip = $email ;

my $MAIL = new Net::SMTP('mail.dc3.adelphia.net');
$MAIL->mail("$adminmail");
$MAIL->to("$recip");
$MAIL->data();
$MAIL->datasend("To: $email"."\n");
$MAIL->datasend("From: $adminmail"."\n");
$MAIL->datasend('Subject: Confirmation'."\n");
$MAIL->datasend("\n");
$MAIL->datasend("Thank you\n");
$MAIL->datasend("for choosing\n");
$MAIL->datasend("Fusion\'s Universe to\n");
$MAIL->datasend("Host your site\n");
$MAIL->datasend("\n");
$MAIL->datasend("Please take a moment to\n");
$MAIL->datasend("verify the information\n");
$MAIL->datasend("you submitted is correct\n");
$MAIL->datasend("as all info is verified\n");
$MAIL->datasend("\n");
$MAIL->datasend(".$fname"."\n");
$MAIL->datasend(".$lname"."\n");
$MAIL->datasend(".$address"."\n");
$MAIL->datasend(".$city"."\n");
$MAIL->datasend('.$state'."\n");
$MAIL->datasend('.$zip'."\n");
$MAIL->datasend(".$phone"."\n");
$MAIL->datasend(".$email"."\n");
$MAIL->datasend("\n");
$MAIL->datasend("If this information\n");
$MAIL->datasend("is incorrect please\n");
$MAIL->datasend("contact the administrator\n");
$MAIL->datasend("ASAP! so it can be\n");
$MAIL->datasend("\n");
$MAIL->datasend("Thank you again\n");
$MAIL->datasend("for choosing\n");
$MAIL->datasend("Fusion\'s Universe\n");
$MAIL->dataend();
$MAIL->quit;

# ***ENDAUTOGEN:EMAIL*** Do NOT modify this line!!  You may enter custom
code after this line.


# ***AUTOGEN:HTML*** Do NOT modify this line!! Do NOT enter custom code in
this section.

# ***ENDAUTOGEN:HTML*** Do NOT modify this line!!  You may enter custom code
after this line.


# ***AUTOGEN:ERRPRINT*** Do NOT modify this line!! Do NOT enter custom code
in this section.

sub PrintError {
print "Content-type: text/html\n\n";
print $message ;

exit 0 ;
return 1 ;
}

# ***ENDAUTOGEN:ERRPRINT*** Do NOT modify this line!!  You may enter custom
code after this line.


# ***AUTOGEN:PARSE*** Do NOT modify this line!! Do NOT enter custom code in
this section.
sub GetFormInput {

 (*fval) = @_ if @_ ;

 local ($buf);
 if ($ENV{'REQUEST_METHOD'} eq 'POST') {
  read(STDIN,$buf,$ENV{'CONTENT_LENGTH'});
 }
 else {
  $buf=$ENV{'QUERY_STRING'};
 }
 if ($buf eq "") {
   return 0 ;
  }
 else {
   @fval=split(/&/,$buf);
  foreach $i (0 .. $#fval){
   ($name,$val)=split (/=/,$fval[$i],2);
   $val=~tr/+/ /;
   $val=~ s/%(..)/pack("c",hex($1))/ge;
   $name=~tr/+/ /;
   $name=~ s/%(..)/pack("c",hex($1))/ge;

   if (!defined($field{$name})) {
    $field{$name}=$val;
   }
   else {
    $field{$name} .= ",$val";

    #if you want multi-selects to goto into an array change to:
    #$field{$name} .= "\0$val";
   }


     }
  }
return 1;
}


# ***ENDAUTOGEN:PARSE*** Do NOT modify this line!!  You may enter custom
code after this line.


----- Original Message -----
From: "bob ackerman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 12, 2002 9:32 PM
Subject: Re: Validation Error


>
> On Sunday, May 12, 2002, at 06:13  PM, Bill Lyles wrote:
>
> > if ($email !~ /.+\@.+\..+/) {
>
> we assume you are assigning something to $email
> and the email address with the '@' is single quoted so it doesn't try to
> interpolate.
> (or you are escaping the '@' in a double quoted string.)
> otherwise the regex looks workable, although people will tell you about
> the difficulties of doing good email address validation and how you should
> use a module made for doing it.
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to