Hi friends,

I have developed page with mail() function.Page worked fine 1 week back but now that code is not working fine.

Please help me to resolve this issue.

The below is the code,


ini_set('SMTP', 'loclhost'); //Suggested by "Some Guy"
ini_set('SMTP_port', 25); //Suggested by "Some Guy"

$name = $_REQUEST['name']; //senders name
$email = $_REQUEST['email'];; //senders e-mail adress
$message = $_REQUEST['message'];; //senders e-mail adress
$contact = $_REQUEST['contact'];; //senders e-mail adress

$recipient = "admin1@xxx.com"; //recipient
$mail_body .= "Name :".$name."\n"; //mail body
$mail_body .= "Email-Id :".$email."\n"; //mail body
$mail_body .= "Contact No :".$contact."\n"; //mail body
$mail_body .= "Address :".$address."\n"; //mail body
$mail_body .= "Message :".$message."\n"; //mail body

$subject = "Enquiry Form"; //subject
$header = "From: ". $name . " <" . $email . ">\r\n"; //optional headerfields

//ini_set('sendmail_from', 'admin@xxx.com'); //Suggested by "Some Guy"
mail($recipient, $subject, $mail_body, $header); //mail command

Punitha Pary