Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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


Report this thread to moderator Post Follow-up to this message
Old Post
chuayl
04-28-05 01:55 PM


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




Report this thread to moderator Post Follow-up to this message
Old Post
Michael D. Ober
04-28-05 08:57 PM


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

Report this thread to moderator Post Follow-up to this message
Old Post
chuayl
04-29-05 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:16 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.