IIS and SMTP - CDO and PDF Files

This is Interesting: Free IT Magazines  
Home > Archive > IIS and SMTP > February 2005 > CDO and PDF Files





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CDO and PDF Files
Jeff

2005-02-15, 5:53 pm

We're having some trouble with some PDF files sent to our customers,
they aren't able to be read because they are "damaged, and cannot be
repaired". Looking into this, I think it has to do with the encoding
we are using. We don't specify a type and I think it's defaulting to a
7-bit encoding, when I think we need 8.

First of all, does that sound right? If so, does anyone have an
example of how to specify the right encoding for PDF files? The
messages are in HTML format, with PDF files attached. We're using VB6
and CDO.

Thanks in advance....

Here is a snippit of the code we use.

With oMail

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= pSendUsingPickup

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= mRunOptions.SMTPServer

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= mRunOptions.SMTPServerPort

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")
= mRunOptions.PickUpPath

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= mRunOptions.SMTPConnectTimeout
.Configuration.Fields.Update

.Subject = "eMail Report
.From = "me@yourcompany.com"
.To = pLastAddr
.AddAttachment (App.Path & "\our_logo.gif")
.AddAttachment "Test.PDF"
.HTMLBody = pHTMLHeader & pHTMLBody & pHTMLFooter
.Send
End With

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com