send mail help
Posted: Thu May 20, 2010 1:40 am
hi,
I have the following email script but it doesnt work can I have any help please
where $email2 is an email saved in the database.
I resieve this error:
Warning: mail() [function.mail]: SMTP server response: 553 sorry, sender mail address must correspond to local mail domain (#5.7.1)
if any one can help I will appreciate it
thanks in advance.
I have the following email script but it doesnt work can I have any help please
Code: Select all
<form action="" method="post" name="form1" target="_parent">
<br>
<br>
<div align="center">
</div>
<table width="378" border="0" align="center">
<tr>
<td>
<div align="right">
<input name="name" type="text" id="name">
</div></td>
<td width="161"><div align="left"><strong>:الإسم</strong></div></td>
</tr>
<tr>
<td>
<div align="right">
<input name="email" type="text" id="email">
</div></td>
<td> <div align="left"><strong>:بريدك الألكتروني</strong></div></td>
</tr>
<tr>
<td><div align="right">
<input name="title" type="text" id="title">
</div></td>
<td><div align="left"><strong>:عنوان الرسالة </strong></div></td>
</tr>
<tr>
<td>
<div align="right">
<textarea name="message" cols="30" rows="5" id="message"></textarea>
</div></td>
<td><div align="left"><strong>:نص الرسالة</strong></div></td>
</tr>
<tr>
<td colspan="2"><div align="center"></div> <div align="center">
<input name="sendMSG" type="submit" id="sendMSG" value="أرسل الرسالة">
</div></td>
</tr>
</table>
<?php
if(isset($_POST['sendMSG']))
{
if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['title']) || empty($_POST['message']))
echo "<center> <h3>الرجاء التأكد من تعبئة جميع الØÙ‚ول</h3></center>";
$to = $email2;
$email = $_POST['email'] ;
$subject = $_POST['title'] ;
$message = "FROM:" ;
$message .= " ";
$message .= $_POST['name'];
$message .= "<br>";
$message .= $_POST['message'] ;
$headers = "From: $email";
if( mail ($to, $subject, $message, $headers) )
echo "<center> <h3>لقد تم إرسال رسالتك</h3></center>";
else
echo "<center> <h3>Ù†Ø£Ø³Ù ØØ¯Ø« خلل ما</center></h3>";
}
?>
</form>
where $email2 is an email saved in the database.
I resieve this error:
Warning: mail() [function.mail]: SMTP server response: 553 sorry, sender mail address must correspond to local mail domain (#5.7.1)
if any one can help I will appreciate it
thanks in advance.