我需要添加一个条件。如果$contact_subject
大于数字 50000,它应该转到一个电子邮件地址,如果它更小,它应该转到另一个电子邮件地址。
if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "email@email.com";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Name: $contact_name \nEmail: $sender \nAccount Number: $contact_subject \nMessage: $contact_message \nIP: $client_ip \nEmail Sent from website http://www.website.com";
$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
if( mail( $receiver, "Email From Website - $subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}