Tuesday, 7 July 2015

How to send mail using PHP ?

You can use this Script to send mail !

$headers = "From: Company name<info@domainname.com>\r\n" .
"Reply-to: Customer<info@domainname.com>\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
$subject="Service Invoice";

$to ="amit******@gmail.com";
mail($to,"Subject","Test Mail" ,$headers);

No comments:

Post a Comment