E-mail With PHP.
PHP uses its inbuilt mail() function to send emails from the script.
Syntax:mail(to,subject,message,headers,parameters)
Example:<?php
$to = "sample@ sample.com";
$subject = " sample mail";
$message = “sample email message.";
$from = " sample1@ sample.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
Header is an optional parameter that specifies any CC or BCC. The mail function requires a working email system. SMTP settings needs to be done in the .ini file.
E-mail With PHP.
PHP supports sending email through a form. First enter the to address, from address, subject, message fields from a simple html form. In the html file use the