pdf - Dynamically attached php file using phpmailer show err on opening the file -
I am sending a PDF file as an attachment using PHPMailer, which is generated using mpdf.
But the attachment is not open from receiving mail and this error indicates that "Adobe Reader can not open the file because the file is either damaged or not supported". It is also saying that the attachment was not properly decoded.
The code I used to upload the file
$ string = file_get_contents ("url var1 and var2"); $ Binary_content = file_get_contents ($ string); $ Emailobj- & gt; Advertent Attachment ($ binary_tent, "invoice pdf", $ encoding = 'base64', type $ '' application / octost-stream ''); ""
Note: I do not want to upload the file to the server.
Please provide any solutions for this.
Comments
Post a Comment