For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > April 2005 > Attachment Problem using CDO for Windows 2000









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 Attachment Problem using CDO for Windows 2000
chuayl

2005-04-28, 8:55 am

i currently working on a email client program using VB to send email with
TIFF File attachment. But the attachment cannot be open while the email is
receive on the recipient side. The file size always shows 1kb less than the
original file attached. It happens to zip, image file also .

May i know what is the problem ?? Below is my code :

Dim iMsg As New CDO.Message
Dim iConf As New CDO.Configuration
Dim Flds As ADODB.Fields

Set Flds = iConf.Fields

With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "my.smtpserver.com.my"
.Item(cdoSMTPConnectionTimeout) = 20 ' quick timeout
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSMTPServerPort) = 25

.Item(cdoSendUserName) = "username"
.Item(cdoSendPassword) = "password"

.Item(cdoURLProxyServer) = "server:80"
.Item(cdoURLProxyBypass) = "<local>"
.Item(cdoURLGetLatestVersion) = True
.Update
End With

With iMsg
Set .Configuration = iConf
.To = "recipient1@mail.com.my"
.From = "sender1@mail.com.my"
.Subject = "my subject"

.AddAttachment App.Path & "\abc.tif"
.Send
End with

Michael D. Ober

2005-04-28, 3:57 pm

Try it without the connection timeout. You may be truncating the message as
it goes through the system. The other possibility is that your proxy
interface is chopping the attachment.

Mike Ober.

"chuayl" <chuayl@discussions.microsoft.com> wrote in message
news:CFC0E340-0D0C-435B-8F92-72D2D7865979@microsoft.com...
> i currently working on a email client program using VB to send email with
> TIFF File attachment. But the attachment cannot be open while the email

is
> receive on the recipient side. The file size always shows 1kb less than

the
> original file attached. It happens to zip, image file also .
>
> May i know what is the problem ?? Below is my code :
>
> Dim iMsg As New CDO.Message
> Dim iConf As New CDO.Configuration
> Dim Flds As ADODB.Fields
>
> Set Flds = iConf.Fields
>
> With Flds
> .Item(cdoSendUsingMethod) = cdoSendUsingPort
> .Item(cdoSMTPServer) = "my.smtpserver.com.my"
> .Item(cdoSMTPConnectionTimeout) = 20 ' quick timeout
> .Item(cdoSMTPAuthenticate) = cdoBasic
> .Item(cdoSMTPServerPort) = 25
>
> .Item(cdoSendUserName) = "username"
> .Item(cdoSendPassword) = "password"
>
> .Item(cdoURLProxyServer) = "server:80"
> .Item(cdoURLProxyBypass) = "<local>"
> .Item(cdoURLGetLatestVersion) = True
> .Update
> End With
>
> With iMsg
> Set .Configuration = iConf
> .To = "recipient1@mail.com.my"
> .From = "sender1@mail.com.my"
> .Subject = "my subject"
>
> .AddAttachment App.Path & "\abc.tif"
> .Send
> End with
>
>




chuayl

2005-04-29, 3:56 am

I dont think is the connection time out problem, it happens to almost all
file type that i tried to attach, and it always will missing 1kb in the total
file size .. thats why it only work on txt file



"Michael D. Ober" wrote:

> Try it without the connection timeout. You may be truncating the message as
> it goes through the system. The other possibility is that your proxy
> interface is chopping the attachment.
>
> Mike Ober.
>
> "chuayl" <chuayl@discussions.microsoft.com> wrote in message
> news:CFC0E340-0D0C-435B-8F92-72D2D7865979@microsoft.com...
> is
> the
>
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com