What are common issues with PHP mail charset encoding?

Common issues with PHP mail charset encoding include garbled or incorrectly displayed characters in the email content. To solve this issue, you can set the proper charset encoding in the email headers using the `Content-Type` header.

$to = "recipient@example.com";
$subject = "Test Email";
$message = "This is a test email with special characters like ü and é.";

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";

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