I am using PHP Code to send email Here is my code
<?php
$message ="<html><head><title>Enquiry Email</title></head><body>";
$message .= <div style="float:left"><img src="url" /></div> ;
$message .="You got a new Enquiry From Following <br/>";
foreach($_POST as $key =>$value){
if(!empty($value)){
$message.="<strong>".ucwords($key)."</strong>: ".$value."<br/>";
}
}
$message .= test content</body></html> ;
//echo $message; exit;
//$message=rtrim(chunk_split(base64_encode($message)));
$to = [email protected] ;
$subject = New Enquiry ;
$headers = MIME-Version: 1.0 . "
";
$headers .= Content-Type: text/html; charset=ISO-8859-1 . "
";
//$headers . = Content-Transfer-Encoding: base64 ;
$headers .= "From: test email<[email protected]>
";
mail($to, $subject, $message, $headers);
?>
i got email in this format
Subject: New Enquiry
Content-Type: text/html; charset=ISO-8859-1
From: test email<[email protected]>
Message-Id: <[email protected]> Date: Tue, 10 Jan 2012 19:17:52 +0530 (IST) X-Brightmail-Tracker: AAAAAA== X-Brightmail-Tracker: AAAAAA==
<html><head><title>Enquiry Email</title></head><body><div style="flaot:left"><img src="linkurl" /></div>You got a new Enquiry From Following <br/><strong>Customer</strong>: Customer<br/><strong>Title</strong>: Mr.<br/><strong>Fistname</strong>: gurpreet<br/><strong>Lastname</strong>: Singh<br/><strong>Telephone</strong>: 212344556<br/><strong>Email</strong>: [email protected]<br/><strong>Address</strong>: addrewss Vi<br/><strong>Catalogue</strong>: Catalogue<br/><strong>Meeting</strong>: Meeting at my home / office<br/><strong>Internet</strong>: Internet<br/>some name </body></html>
但现在,当我试图在电子邮件服务器上发送时,它就以超文本格式提供适当的产出。
感谢!