Как минимум, не хватает закрывающего boundary
$body .= "--$boundary" . $eol."--";
в конце.
И скорей всего еще не хватает пустой строки между заголовками и телом каждого парта.
Если не поможет - положите куда-нибудь то, что приходит.
попробйте с такими правками:
<?php
$uploaddir = '../img/upload/home-bg.jpg';
$to = 'xyz@gmail.com';
$subject = "Some";
$message ='
<html>
<head>
<title>' . $subject . '</title>
</head>
<body>
<p>Картинка:</p>
</body>
</html>';
$fp = fopen($uploaddir,"rb");
$file = fread($fp, filesize($uploaddir));
fclose($fp);
$boundary = md5(time());
$eol = "\r\n";
echo filesize($uploaddir);
echo basename($uploaddir);
echo mime_content_type($uploaddir);
echo pathinfo($uploaddir, PATHINFO_EXTENSION);
$headers = "MIME-Version: 1.0" . $eol;
$headers .= "From: Test" . $eol;
$headers .= "Reply-To: $user_email" . $eol;
$headers .= "Content-Type: multipart/mixed; boundary=".$boundary. $eol;
$body = $eol."--$boundary" . $eol;
$body .= "Content-Type: text/html; charset=utf-8" . $eol;
$body .= "Content-Transfer-Encoding: base64" . $eol;
$body .= $eol;
$body .= chunk_split(base64_encode($message));
$body .= $eol;
$body .= "--$boundary" . $eol;
$body .= "Content-Type: ".mime_content_type($uploaddir)."; name=" . basename($uploaddir) ."" . $eol;
$body .= "Content-Disposition: attachment; filename=" . basename($uploaddir) ."" . $eol;
$body .= "Content-Transfer-Encoding: base64" . $eol;
$body .="X-Attachment-Id: ".rand(1000,99999)."" . $eol;
$body .= $eol;
$body .= chunk_split(base64_encode($file));
$body .= $eol;
$body .= "--$boundary"."--".$eol;
mail($to,$subject,$body,$headers);