I wanted to send an email that only contained an attachment as follows: $headers = “MIME-Version: 1.0\r\n”; $headers .= “To: <”.$to_email.”>\r\n”; $headers .= “From: “.$from_name.” <”.$from_email.”>”; $random_hash = md5(date(‘r’, time())); // add boundary string and mime type specification $headers .= “\r\nContent-Type: multipart/mixed; boundary=\”PHP-mixed-”.$random_hash.”\”"; // read the atachment file contents from a string previously formed, // [...]