Page 1 of 1

Mail() headers!

Posted: Tue Nov 11, 2003 9:32 pm
by whci98
Hi, I'm using the mail() function to send mail. I'm having problems with the headers. Can someone please tell me what am I doing wrong. When I send the mail without the headers it goes through fine. With the headers the mail does not go through. All my variables are coming from a Flash file. Thanks :?


Code: Select all

<?php
		
		
		// contactus.php
		
		$mailTo = "<whci98@noumanzafar.com>";
		
		
		
		$mailSubject = "Contact us (Rhonen Group)";
		$headers = "Name:$senderfName $senderlName $senderEmail\r\n";
		$headers .= "Phone:($areacode) $phone $number $extn\r\n"
		$mailMessage = "Comments:\n\n $senderComments";
		
		//Send mail
		mail($mailTo, $mailSubject, $mailMessage, $headers);
		
		$response = "Thank you $senderfName $senderlName,\n\nYour message has been recieved. We will get back to you within 24 hours. Thank you for your interest in Rhonen Group";
		
// Respond to Flash movie!		
print "&result=Okay&response=$response"; 			 
		
		

?>

Posted: Tue Nov 11, 2003 9:45 pm
by Gen-ik
I could be wrong but I don't think Name and Phone are valid email headers.... I've never come accross them any way.

Usual headers are FROM: CC: BCC: and any other MIME related stuff.