Jump to content

mail() function - normal message received as attachment


abhi_madhani

Recommended Posts

Hi,

 

I am using PHP mail() function to sent message. Following is the code, the message is received in email account, but as attachment, not displayed in the body section as normal message would.

 

Please can you guys help, as why is this message going as attachment, but not being displayed in the body of email.

 

Below is the url which gives preview as to what I mean.

 

http://i56.tinypic.com/29fujxf.jpg

 

	$to = $_POST['to'];
$subject = ' web visior';
$customer = stripslashes($_POST['customer']);
$email = stripslashes($_POST['email']);
$contactinfo = stripslashes($_POST['contactinfo']);
$body = stripslashes($_POST['enquiry']);
$header =  	'From:'.$email.'\r\n';
$header = 	'Reply-To:'.$email.'\r\n';
$header = 	'X-Mailer: PHP/' . phpversion();
$header = 	'Content-type: text/html\r\n';
$message = 	'<html><body>
			<table>
				<tr><td>From:'.$customer.'</td></tr>
				<tr><td>Email:'.$email.'</td></tr>
				<tr><td>Contact No'.$contactinfo.'</td></tr>
				<tr><td style="center"><b>Message:</b></td></tr>
				<tr><td>'.$body.'</td></tr>
			</body></html>';

 

 

Regards,

Abhishek

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.