1.
The mail () function allows you to send e-mail directly from a script.
Returns True if the post of the message was successfully received, otherwise false.
Mail (to,subject,message,headers,parameters)
to required. Specify the recipient of the message.
Subject required. Specify the subject of the message. The parameter cannot contain any line-wrapping characters.
Message required. Specifies the message to be sent.
Headers is optional. Specify additional headers, such as from, Cc, and BCC.
Parameters is optional. Specifies additional parameters for the SendMail program.
Required: PHP.ini Configuration Sendmail Support
For example:
$to = "******@163.com";
$subject = "My subject";
$txt = "Hello world!********** @qq. com";
$headers =
Mail ($to, $subject, $txt, "from: ********* @qq. com". "\ r \ n". " CC: ********** @hotmail. com ");
?>
Headers write errors can cause send failures