thoford75
09-08-2011, 10:37 AM
I'm looking to send a file on my server called 'Spreadsheet.xls' as an attachment in php mail.
include "../templates/email_body.php";
$email_headers = "From: tom@xyz.com\r\n";
$email_headers .= "BCC: joe@xyz.com\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);
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...?
include "../templates/email_body.php";
$email_headers = "From: tom@xyz.com\r\n";
$email_headers .= "BCC: joe@xyz.com\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);
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...?