It's free and you have access to premium codes!
Welcome back! Please login to your account.
Don't worry, we'll send you a message to help you to recover your acount.
Written by 11 September 2020
Although it seems that sending mail with PHP is very easy and there exists a function that simply does the job, it is not as it should be. Yes! Some hidden options highly affect this mailing function and, in fact, sometimes lead to failure. The following snippet helps yo use PHP mailing capacity truly and easily. Enjoy!
<!-- this script is provided by www.phpfreecode.com coded by: Kerixa Inc. -->
function sendmail($to,$subject,$title,$content){
$mailfrom = "no-reply@freewebsonline.com";
$headers = "From: Free Webs Online <" . strip_tags($mailfrom) . ">\r\n";
$headers .= "Reply-To: ". strip_tags($mailfrom) . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$ftemp = dirname(__FILE__).'/mailtemplate.htm';
$file = fopen($ftemp,"r");
$template = fread($file,filesize($ftemp));
fclose($file);
$message = replace_all($template,'%title%',$title);
$message = replace_all($message,'%content%',$content);
return mail($to,$subject,$message,$headers);
}<a target='_blank' href='www.phpfreecode.com' style='font-size: 8pt; text-decoration: none'>Php Best Codes</a>