PDA

View Full Version : Cannot send mail using php



rmin75
2011-04-18, 11:44 PM
Hi guys,
I just signed up for hosting. I'm having trouble sending emails using php. My script is as follows:

------------------------------------------------
<?php

$name = $HTTP_POST_VARS['name'];
$email = $HTTP_POST_VARS['email'];
$message = $HTTP_POST_VARS['message'];

$name = stripslashes($name);
$email = stripslashes($email);
$message = stripslashes($message);

$rec_email = "info@kreativemind.ca";
$subject = "Web Page Contact Form";

$header .= "Reply-To: $email\r\n";
$header .= "Return-Path: $email\r\n";
$header .= "From: $email\r\n";
$header .= "Organization: $name\r\n";
$header .= "Content-Type: text/plain\r\n";


$msg_body .= "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n";
$msg_body .= "Name: $name\n";
$msg_body .= "E-Mail: $email\n";
$msg_body .= "Message: $message\n";
$msg_body .= "_____________________________________________\n";

$header_info = "From: ".$name." <".$email.">";

mail($rec_email, $subject, $msg_body, $header_info);

?>
-------------------------------------------------

Thank you in advance.