One of my absolute favorite things about PHP is how easy it is to send an email. On a properly configured server, the process is as simple as using the mail() function.
mail ($to, $subject, $body);
The $to value should be an email address or a series of addresses, separated by commas. The $subject value will create the email’s subject line, and $body is where you put the contents of the email. Use the newline character (\n) within double quotation marks when creating your body to make the text go over multiple lines.
The mail() function takes a fourth, optional parameter for additional headers. This is where you could set the From, Reply-To, Cc, Bcc, and similar settings. For example,
mail ('firstname.lastname@example.org', → 'Question ...