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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.