קח זה הקוד שלך:
PHP קוד:
<?php
// Headers
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=windows-1255' . "\r\n";
$headers .= "From: $name<$email>\r\n";
$to = $CONFIG['email'];
$subject1 = "{$CONFIG['subject']} - $name";
$message = <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1255" />
<title>$subject1</title>
</head>
<body>
<div dir="rtl" align="right">
<h4>התקבלה הודעה חדשה מטופס היצירת קשר</h4><br />
נושא ההודעה: $subject<br />
שם יוצר הקשר: $name<br />
אימייל של יוצר הקשר: $email<br />
תוכן ההודעה: $body<br />
</div>
</body>
</html>
HTML;
if(mail($to,$subject1,$message,$headers))
echo "<script language=\"javascript\">alert('המייל נשלח בהצלחה');window.location=window.location</script>";
?>
נסה את זה זה צריך לעבוד