Thursday, 29 August 2013

how send mail using php mail function

how send mail using php mail function

How to send mail in php
//$from2 = `Newslatter <`. $from1.`>`;
$headers = 'MIME-Version: 1.0' . "\r\n`;
$headers.= 'Content-type: text/html; charset=utf-8' . `\r\n`;
$headers.= `From: Newslatter ' .$from1.`\r\n`;
$headers .= `Reply-To: '.$from1.`\r\n`;
$headers .= `Return-Path:'.$from1.` \r\n`;
$headers .= `CC: `.$from1.`\r\n`;
$headers .= 'BCC: '.$from1.`\r\n`;
if(mail($to,$subject,$message,$headers)){
return true;
}
else{
return false;
}

No comments:

Post a Comment