| 
	
 | 
 Posted by shror on 02/19/07 15:27 
dear all, 
 
i have started learning php 2 weeks ago and i have wrote my first 
script for mail sender and the script takes all my data and move to 
the thanks page but the problem is that the mails never comes, so i 
need your help with me, and here is my script: 
 
mail.htm code: 
 
<form method="POST" action="mail.php" onSubmit=""> 
    <p>email <input type="text" name="email" size="20"></p> 
  <p>subject <input type="text" name="subject"></p> 
  <p>message<textarea rows="2" name="message" cols="20"></textarea></ 
p> 
  <p><input type="submit" value="Submit" name="B1"><input type="reset" 
value="Reset" name="B2"></p> 
</form> 
 
 
mail.php code: 
 
<?php 
$email = $HTTP_POST_VARS['email']; 
$subject = $HTTP_POST_VARS['subject']; 
$msg = $HTTP_POST_VARS['message']; 
$from = "s7els7.com"; 
if (mail($email,$subject,$message,$from)) { 
  echo "<h4>Thank you for sending email</h4>"; 
} else { 
  echo "<h4>Can't send email to $mail</h4>"; 
} 
?> 
 
 
now please tell me whats wrong with this scripts as i am still trying 
to learn the php and i need an expert help. 
you can check my script working at www.s7els7.com/mail.htm 
 
thanks 
 
shror
 
[Back to original message] 
 |