Reputation: 12541
What is the main problem that causes corrupt PDF attachments using Classic ASP CDO?
This is the error message when trying to open the document:
There was an error processing a page. There was a problem reading this document (109).
Upvotes: 0
Views: 1380
Reputation: 11527
For CDONTS it is UUEncoding by default and that is probably not supported anymore by the mail client . To make it base64 encoding you need to attach the file as below.
objCDO.AttachFile fullfilepath, attachmentfilename, 1
The 1 being Base 64 vs the default 0 of UUEncoding.
Upvotes: 0
Reputation: 10752
What are you using to send email? CDOSYS, CDONTS, third party component?
Are you sending immediately or having the mail put in the pick up folder? If you use the pick up folder option then there is a known problem where period characters are removed if at the beginning of the line which could cuase corruption, see http://support.microsoft.com/?id=286358.
If using CDOSYS then I have read issues of encoding problems. I think CDOSYS does binary encoding by default in some systems. You can try changing to Base64 by changing your attachment encoding like this...
objAttachment.ContentTransferEncoding = "base64"
If that doesn't work your problems could probably be solved by using a different mail component such as w3jmail (free for Classic ASP version).
Upvotes: 1