470,648 Members | 1,455 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,648 developers. It's quick & easy.

CDONTS - PDF Attachment / decoding problem

I am using CDONTS to send email from an ASP script.

Attached to each of these emails is a 34K PDF file. 90% of the time
the file arrives intact. 10% of the time, however, users are unable
to open the file.

It appears that users using some sort of webmail recieve an improperly
decoded version of the file where as users of POP3 non-web email
clients (e.g. Outlook) generally recieve the file intact.

Thus far, all users reporting errors have up-to-date versions of Adobe
Reader and are able to read the PDF file if I resend it from my
desktop out of Outlook.

I have tried to open the files some users have reported problems with
(after they forward me the copy they received) and I have the same
problem. The file size on the PDF that could not be opened had grown
to 47K.

Code is pasted below.

I would appreciate any help.
Thanks, Kyle.

' -------- Send Email w/ Attachment Code ------------

dim objSendMail, tmpSubj, tmpFrom
set objSendMail = Server.CreateObject("CDONTS.NewMail")
With objSendmail
.From = eFrom
.To = eTo
.Cc = eCC
.Bcc = eBCC
.Subject = eSubj
.AttachFile(eAttach)

'If HTML Email then add HTML properties
if instr(1,eBody,"<HTML>",1) <> 0 then
.BodyFormat = cdoBodyFormatHTML
.MailFormat = cdoMailFormatMIME
end if
.Body = eBody
.Send
End With
set objSendMail = nothing
' ---------- End Code --------------
Jul 19 '05 #1
2 6177
Kyle Pula wrote:
I am using CDONTS to send email from an ASP script.

Attached to each of these emails is a 34K PDF file. 90% of the time
the file arrives intact. 10% of the time, however, users are unable
to open the file.

It appears that users using some sort of webmail recieve an improperly
decoded version of the file where as users of POP3 non-web email
clients (e.g. Outlook) generally recieve the file intact.

Thus far, all users reporting errors have up-to-date versions of Adobe
Reader and are able to read the PDF file if I resend it from my
desktop out of Outlook.

I have tried to open the files some users have reported problems with
(after they forward me the copy they received) and I have the same
problem. The file size on the PDF that could not be opened had grown
to 47K.

Code is pasted below.

I would appreciate any help.
Thanks, Kyle.

' -------- Send Email w/ Attachment Code ------------

dim objSendMail, tmpSubj, tmpFrom
set objSendMail = Server.CreateObject("CDONTS.NewMail")
With objSendmail
.From = eFrom
.To = eTo
.Cc = eCC
.Bcc = eBCC
.Subject = eSubj
.AttachFile(eAttach)

'If HTML Email then add HTML properties
if instr(1,eBody,"<HTML>",1) <> 0 then
.BodyFormat = cdoBodyFormatHTML
.MailFormat = cdoMailFormatMIME
end if
.Body = eBody
.Send
End With
set objSendMail = nothing
' ---------- End Code --------------


Call the attachFile method after setting the MailFormat property, since this
property set the encoding method applied to the file
http://msdn.microsoft.com/library/de...il_object_.asp
Hope this help
Jul 19 '05 #2
This fixed my problem; thanks a lot.

"jbongran" <jb******@free.fr> wrote in message news:<3f***********************@news.free.fr>...
Kyle Pula wrote:
I am using CDONTS to send email from an ASP script.

Attached to each of these emails is a 34K PDF file. 90% of the time
the file arrives intact. 10% of the time, however, users are unable
to open the file.

It appears that users using some sort of webmail recieve an improperly
decoded version of the file where as users of POP3 non-web email
clients (e.g. Outlook) generally recieve the file intact.

Thus far, all users reporting errors have up-to-date versions of Adobe
Reader and are able to read the PDF file if I resend it from my
desktop out of Outlook.

I have tried to open the files some users have reported problems with
(after they forward me the copy they received) and I have the same
problem. The file size on the PDF that could not be opened had grown
to 47K.

Code is pasted below.

I would appreciate any help.
Thanks, Kyle.

' -------- Send Email w/ Attachment Code ------------

dim objSendMail, tmpSubj, tmpFrom
set objSendMail = Server.CreateObject("CDONTS.NewMail")
With objSendmail
.From = eFrom
.To = eTo
.Cc = eCC
.Bcc = eBCC
.Subject = eSubj
.AttachFile(eAttach)

'If HTML Email then add HTML properties
if instr(1,eBody,"<HTML>",1) <> 0 then
.BodyFormat = cdoBodyFormatHTML
.MailFormat = cdoMailFormatMIME
end if
.Body = eBody
.Send
End With
set objSendMail = nothing
' ---------- End Code --------------


Call the attachFile method after setting the MailFormat property, since this
property set the encoding method applied to the file
http://msdn.microsoft.com/library/de...il_object_.asp
Hope this help

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Matthias Stern | last post: by
2 posts views Thread by Robert Suffecool | last post: by
1 post views Thread by Dave Karmens | last post: by
Dormilich
7 posts views Thread by Dormilich | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.