Hi,
I'm having some trouble with this formToEmail script. It shuld take
variables from html form, send them to me, and then send auto reply to the
person who filed the form. But the problem is that, if the person dont enter
e-mail, or enter "sjhdfzg" or leave empty, i receieve internal server error.
I've looked for some functions, and found some eregi, that can cehck e-mail
before sending. I just dont know how ti aply it. here is the code:
<first mail>
@mail($toemail, $subject, $linetot1, "From: $name <$email>\nContent-Type:
text/plain; charset=windows-1250");

<second mail> The problem one with this function
function validEmail($email) {
if
(eregi("^[a-z0-9]+([-_\.]?[a-z0-9])+@[a-z0-9]+([-_\.]?[a-z0-9])+\.[a-z]{2,4}
", $email))
@mail($email, $subject, $linetot2, "From: $toname <$toemail>\nContent-Type:
text/plain; charset=windows-1250");
}

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to