Essentially what I\'m trying to do is attach a file to an email I\'m sending out. Simple enough, right? For some reason or another it does not like the following code (presu
If you insist on building your own header, I would suggest doing so with the aid of your output buffer - also I noticed that you were failing to close up your content boundaries. Pasted below is how I would edit the header generating part of your script.
ob_start();
?>
MIME-Version: 1.0
From: noreply@x.com
Reply-To: noreply@x.com
Content-Type: multipart/mixed; boundary=""
This is a multi-part message in MIME format.
--
Content-Type:text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
----
--
Content-Type: text/csv; name=""
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=""
----