PHP Mail Function@ Shwetank education.com

PHP Mail Function

Syntax
mail(to,subject,message,headers)

to-    Required, Specifies the receivers of the email
subject-   Required,Specifies the subject of the email.
message-    Required, Defines the message to be sent.
headers –   Optional, Specifies additional headers, like From, Cc, and Bcc.

Example Mail Function

<?php
$to = “info@shwetankeducation.com”;
$subject = “Query”;
$txt = “Your 1st query!”;
$headers = “From: shwetankkg@gmail.com” . “\r\n” .
“CC: herrymah@gmail.com”;

mail($to,$subject,$txt,$headers);
?>