Hi,
I have just started using PHPMailer and find it quite good. However, I had a probelm with sending pdf attachments. I created a file on the server and then send it off as attachment in email as pdf format.

The file sends ok as an attachment but when I go to open it up it is blank. I know that if I open the file in the browser it works ok or download it via ftp in binary mode the file opens ok.
The line of code is
$mail->AddAttachment("bookings.pdf");

Would anyone be able to tell me why when I try to open the file it is blank. Everything else seems to go fine and there are no errors sending the mail.

Any help would be appreciated
Thanks
Peter

    I'm not familiar with the PHPMailer code, but I know there's problems sending attachments from Windows. Is this a Windows or Nix machine?

      the server from which I am running the script is a unix machine

        Write a Reply...