Email sending in PHP

This below code is used for Email sending in PHP. In this code we are sending a simple email with HTML content.
This below code is used for Email sending. In this code we are sending a simple email with HTML content.

 
$to = "abcd@gmail.com";		
	$header .= "MIME-Version: 1.0\r\n";
	$header .= "Content-Type: text/html; charset=\"utf-8\"\r\n";
	$header .= "Content-Transfer-Encoding: 7bit\r\n";
	$header .= "From: ". $name . " <" . "Emails Demo"  . ">\r\n"; 		
	$subject = "Shoplife Insurance - Free Quote Mail";		
	$content = '';
	$content.= '';		
	$content.= '';	
	$content.= '';	
	$content.= '';		
	$content.= '
A e- mail is received.
Details is given below:
   
Name :'. $contactname.'
Email :'.$phone_no.'
Phone No :'.$messages.'
Message :'.$email.'
'; @mail($to,$subject,$content,$header);

This is well tested and i used it many times.

Bivash Kanti Pal

Hi guys, This is the place where developers are sharing there thoughts....

One thought on “Email sending in PHP

Leave a Reply

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