Problem with mail() from :

Hello,

The from: field in header shows my hosting address instead of the one i given.
what could be wrong?

function actmail($email,$auth){

	$headers = 'To:' . $email . "\
";
	$headers .= 'From: hello@rent.net' . "\
";
	$headers .= 'Return-Path: hello@rent.net' . "\
";
	$headers .= 'MIME-Version: 1.0' . "\
";     
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\
";
	$headers .= 'Content-Transfer-Encoding: 8bit'. "\
";
	$headers .= 'X-Priority: 3' . "\
";
	$headers .= 'X-MSMail-Priority: Normal' . "\
";
	$headers .= 'X-Mailer: php' . "\
\
";
		
	$message .= "Thank you for registring at rent.net. Please follow this link to activate your account : " . $auth;
	
	if (mail($email,"Rent.net Account activation information.",$message, $headers)){
	   //echo "Thank You! You will be notified of the launch."; 
	   //return true;
	}else{ 
	   //echo "Sorry! Message sending failed.";
	   //return false;
	}

}

Now problem is as i sad, when a user receives the message, the from shows : mfare@box252.bluehost.com (assume mfare is my hosting account name at blue host) insted of hello@rent.net.

Try this:


//-f parameter after headers forces sendmail to set the from email
mail($email,"Rent.net Account activation information.",$message, $headers, -fhello@rent.net)

Thanks buddy:)
that worked!!

if (mail($email,"Rent.net Account activation information.",$message, $headers,'-fhello@rent.net')){

Hello,
i just found the actual problem. i am sending mails using hello@rent.net without creating an email account in the hosting. i just created and now it showing the from : field correctly as in the headers.