\r\n"; if ($replyTo) { $headers .= "Reply-To: $replyTo\r\n"; } $sent = mail($to, $encodedSubject, $htmlBody, $headers); if (!$sent) { error_log("Mailer error: mail() failed for recipient $to"); } return $sent; } }