$mail_headers .= "MIME-version: 1.0\n";
$mail_headers .= "Content-type: multipart/mixed; boundary=\"$boundary\"";
$mail_headers .= "X-attachments: $file_name\n";
credo che sia il punto al primo $mail_headers (di sicuro però non so) prova a fare
codice:
$mail_headers = "MIME-version: 1.0\n"; 
$mail_headers .= "Content-type: multipart/mixed; boundary=\"$boundary\""; 
$mail_headers .= "X-attachments: $file_name\n";