Click to See Complete Forum and Search --> : .send method hanging.


Mark
05-23-2002, 03:10 AM
Greetings,
this is a crosspost from microsoft.public.win32.programmer.messaging

This is urgent and i'm get desparate for a solution. *ANY* pointers or help appreciated.
Contact me by email if you wish.


I'm writing an app that sends email via our isp's smtp server in VB using
CDO for Windows 2000.

There is a very frustrating problem.

Intermittantly the .send method causes the app to hang forcing me to
terminate the visual basic instance from task manager.

Below is the code i'm using.

With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = ServerToSubmitTo
.Item(cdoSMTPConnectionTimeout) = 10
.Update
End With


With iMsg
Set .Configuration = iConf
.DSNOptions = cdoDSNFailure
.To = DestAddress
.From = ReplyAddress
.Subject = Subjectline
.TextBody = Bodytext
.AddAttachment (FilePath)
.Send
End With

the problem is that i am unable to troubleshoot / debug the problem because
when the send method hangs i cant get any error messages or anything. it
just hangs.

this problem happens only sometimes and i am unable to figure out why.

any help or pointers appreciated.


ps
even if i could just get the dang thing to fail, i would be happy. that way
i could programme around the error. but currently because the app locks up i
cant do anything.

btw, i am using On Error Resume Next


pps
is this likely to have anything to do with my problem??

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q254795

i already have windows 2000 sp2 and office 2000 sp2 installed.

so despite what that kb article sayes, it aint fixing my problem.