Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageTry 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 > >
Post Follow-up to this messageI 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 tota l 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 > > > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.