Login  
Search All Forums
Dart Home | PowerTCP Mail for ActiveX | Custom Development Reply | PowerTCP Mail for ActiveX Topics | Forums   
AuthorForum: PowerTCP Mail for ActiveX
Topic: losing RAS connection when using SMTP Control
gstpierre

From: Charny, QC Canada
Posts: 2
Member Since: 08/14/03
posted August 14, 2003 11:18 AM

Hi, I've had an unusual problem for a while, and since I cannot find the origin I am taking the time to post here in case someone else has seen the same kind of problem before.

I am using the SMTP Control in an industrial application under Visual C++ to send e-mail notifications when certain events happen. We would like to offer our customers the support of dial-up connections if they are not connected to their SMTP through a LAN.

For this purpose, I am using the Windows RAS API to connect to a remote computer, before initializing an SMTP object. When I then try to use the SMTP object, my RAS connection suddenly gets dropped (the moment is partly sporadic, it can happen when I do SMTP.GetMessage or only later with SMTP.Login). I use CoGetClassObject to get a IClassFactory2 pointer and then call CreateInstanceLic to get the ISmtpPtr.

What is mostly unusual is that if I establish the dial-up connection outside of my application first, I can then send mail just fine (my application detects if the connection is already established before dialing). I can also use the same API calls from another application first and then send mail through my application. Finally, I can establish a connection from my application, then break in my code before using the Mail Tool and restart the application, and then I can send mail just fine and I never lose the connection. All of this works great, but I lose the connection everytime I try to dial-up and then send mail from the same running process, even if I sleep for 30 seconds between the two actions...

Any ideas concerning this are welcome!
gstpierre

From: Charny, QC Canada
Posts: 2
Member Since: 08/14/03
posted August 14, 2003 11:35 AM

Just one more detail:

I inspected the two modems' logs and they seem to indicate that the remote computer is the one dropping the connection, but I just have no idea why...
Reply | PowerTCP Mail for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX