What are some common headers used in PHP email sending functions?

When sending emails in PHP, it is important to include headers for various purposes such as setting the content type, specifying the sender, and adding additional information. Some common headers used in PHP email sending functions include "From", "Reply-To", "Content-Type", and "Cc" (carbon copy).

// Example of sending an email with common headers using PHP

$to = "recipient@example.com";
$subject = "Test Email";
$message = "This is a test email.";

$headers = "From: sender@example.com\r\n";
$headers .= "Reply-To: replyto@example.com\r\n";
$headers .= "Cc: cc@example.com\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

mail($to, $subject, $message, $headers);