I'm looking to send a file on my server called 'Spreadsheet.xls' as an attachment in php mail.
The file Spreadsheet.xls is in the same folder as this php file.
I've had a look around on google and it seems a lot harder to do than it should!? Most the articles are about uploading a document to be sent by email, but I already have the file to send...?
PHP Code:
include "../templates/email_body.php";
$email_headers = "From: [email protected]\r\n";
$email_headers .= "BCC: [email protected]\r\n";
$email_headers .= "Content-Type: text/html;\r\n charset=\"iso-8859-1\"\r\n";
mail("$customer_email","Sending Attachment",$email_message,$email_headers);
I've had a look around on google and it seems a lot harder to do than it should!? Most the articles are about uploading a document to be sent by email, but I already have the file to send...?
Comment