php mail form not working
Posted by: kidart
Posted on: 2009-10-19 09:29:00
Iīm having problems with my contact form. It works perfect in every other server i try it, but when i upload it to dreamhost i donīt recieve any e-mail.
this is the php code:
<?
//!empty($HTTP_POST_VARS['sender_mail']) || !empty($HTTP_POST_VARS['sender_message']) || !empty($HTTP_POST_VARS['sender_subject']) || !empty($HTTP_POST_VARS['sender_name'])
if(1)
{
$to = 'pablo@kidart.com.ar';
$subject = "Irene Brandt Webmail";
$body = stripslashes($HTTP_POST_VARS['sender_messag']);
$body .= "\n\nThe following person has subscribed to your maillist \n";
$body .= "name: " . $HTTP_POST_VARS['sender_name'] . ", email: " . $HTTP_POST_VARS['sender_mail'] . ", country: " . $HTTP_POST_VARS['sender_subject'] . ", profession: ". $HTTP_POST_VARS['sender_message'] ."\n";
$header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>
do i have to edit the php.ini to enable the php mail () function??
I would really apreciate to have a little help with this, itīs the last thing to solve before launching the site.