What is the function in PHP that can be used to send emails and where can one find more information about it?
To send emails in PHP, you can use the built-in function `mail()`. This function takes parameters such as the recipient's email address, the subject of the email, the message body, and optional additional headers. More information about the `mail()` function and its usage can be found in the PHP documentation.
$to = "recipient@example.com";
$subject = "Hello from PHP!";
$message = "This is a test email sent from PHP.";
$headers = "From: sender@example.com";
mail($to, $subject, $message, $headers);