simple mail format

$message = 'Hello Admin,<br><br>Today is the [event] of [user_name].<br><br>Thanks ';
$search 	= array('[event]', 
                  '[user_name]');
$replace	= array($event, 
		 $adminName);
						
 $message =str_replace($search,$replace,$message);
		
 $headers  = "From: ".$config->siteName."<".$config->siteEmail.">\r\n";
 $headers .= "Reply-To: ".$config->siteName." <".$config->siteEmail.">\r\n";
 $headers .= 'MIME-Version: 1.0' . "\n";
 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 @mail(ToMail, subject , $message ,$headers );	

Leave a Reply

Your email address will not be published. Required fields are marked *