sub sendMail { $email = $FORM{'Email'} ; if (length $email > 80) { &Show_Critical_Error ('Email Address too long!'); } if ($email =~ /^[^@]+@([-\w]+\.)+[A-Za-z]{2,4}$/) { open(MAIL, "|$email_path -t -oi -odq") || &Show_Critical_Error('System Error. Unable to open mail application.') ; print MAIL "To: myemail\@mydomain.com(my domain name)\n" ; print MAIL "From: $FORM{'Email'} (JazzKids SITE)\n" ; print MAIL "Subject: WEBSITE CONTACT-jazzkids\n" ; print MAIL "\n" ; print MAIL "Name: $FORM{'Name'}\n\n" ; print MAIL "Email: $FORM{'Email'}\n\n" ; print MAIL "Address: $FORM{'Address'}\n\n" ; print MAIL "City: $FORM{'City'}\n\n" ; print MAIL "State: $FORM{'State'}\n\n" ; print MAIL "Zip: $FORM{'Zip'}\n\n" ; print MAIL "Specialty: $FORM{'Specialty'}\n\n" ; print MAIL "Best to reach by: $FORM{'Reachby'}\n\n" ; print MAIL "Best to reach when: $FORM{'Reachwhen'}\n\n" ; print MAIL "Comments: $FORM{'Comments'}\n\n" ; print MAIL "----------------------------------------\n\n" ; print MAIL "Sent from: $FORM{'form'}\n\n" ; close(MAIL) ; } else {&Show_Critical_Error('EMAIL ADDRESS INVALID.') ;} }