Attaching PDF files in email
Posted: Thu Mar 15, 2007 12:32 pm
Hi
I`m trying to send out an email with 3 different pdf files but can only get it work with 1 file
here is my exisiting code:
can anyone please help me where to put the code to add the other 2
Thanks
I`m trying to send out an email with 3 different pdf files but can only get it work with 1 file
here is my exisiting code:
Code: Select all
<?
$namefile= "PDF_files/file1.pdf";
$namefile2= "PDF_files/file2.pdf";
$namefile3= "PDF_files/file3.pdf";
$to = 'myemail';
$subject = 'Test email with attachments';
$message="test";
$headers ="Content-Type: application/pdf; name=\"".$namefile."\"";
$mail_sent = @mail( $to, $subject, $message, $headers );
echo $mail_sent ? "Mail sent" : "Mail failed";
?>Thanks