What common mistakes or typos should be avoided when defining the $header variable for sending HTML emails?

When defining the $header variable for sending HTML emails, common mistakes or typos to avoid include missing a semicolon at the end of each header line, not properly formatting the headers, and misspelling header names. To avoid these issues, ensure that each header line ends with a semicolon, use the correct header names (e.g., "Content-Type" for specifying the email content type as HTML), and format the headers correctly with "\r\n" at the end of each line.

// Define headers for sending HTML emails
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers .= "From: Your Name <your@example.com>\r\n";