Hi forum!
I am working on a way to email an ms-excel file as an attachment using PHP. I have downloaded the mime classes from Richard Heyes' phpguru.org site and followed his example #3 file but I cannot get this to actually attach my file. It will find the file but will not attach it. Here is my code:
// SEND EMAIL - using Richard Heyes Function Library
include('class.html.mime.mail.inc');
$mail = new html_mime_mail(array('X-Mailer: Html Mime Mail Class'));
$attachment = $mail->get_file($fich) or die("Could not get file1");
$text = "Mike- Attached is a file with your current new signups for Meeting Planner Guides.";
$mail->add_text($text);
$mail->add_attachment($attachment, 'labels.xls', 'application/vnd.ms-excel') or die("Could not add attachment2");
$mail->build_message() or die("Could not build message");
$mail->send('Rosemont.com', 'chris@designdesign.com[localhost]', 'Chris Chaudruc', 'chris@designdesign.com', 'Mailing labels') or die("could not send email");