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: Tracking email progress...
cjoyce

From: Apex, NC USA
Posts: 9
Member Since: 03/25/02
posted March 28, 2002 10:21 AM

How do you match a Send request to a Progress or Error event? If you are sending multiple emails at the same time and you don't use blocking, they will be sent asynchronously. I expected the Send method to return a cookie that could be used in the Progress or Error event to trace the message. Otherwise, you have no idea which email was sent or which one failed. Am I missing something?
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted March 28, 2002 12:57 PM


Hi,
If you have multiple controls doing sends, they will either have their own events, or, if you are using a control array, they will be identified by the events' Index parameter.
You should not be calling Send again on an individual control until it has completed its previous Send.
-ken

K M Drake
Dart Tech Support
cjoyce

From: Apex, NC USA
Posts: 9
Member Since: 03/25/02
posted March 28, 2002 1:20 PM

Thanks for the reply. I should have mentioned that I'm using C++ to implement an email server. I think that means that a control array is out of the question - that's a VB thing, right? If you have a non-blocking call to Send, can't you make subsequent calls to it without waiting for the first job to finish?

My server scans a directory for "email jobs" and then calls the DartMail SMTP control to do the work. Because there may be several jobs in that directory at once, I invisioned processing each job in it's own thread. Are you saying that each thread should create an instance of the DartMail control? The event handlers don't know anything about an index so there would be no way for the event to know which send request generated the error/progress. It sounds like you are saying that each thread that calls the Send method needs it's own event handler. If I use the blocking approach to Send, then my email server could only process one job at a time - not the end of the world, but not efficient.
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted March 28, 2002 4:37 PM


Hi,
No, you cannot make subsequent calls until the first has finished.
Yes, you could create an instance of the control for each thread. You would be able to block and still use multiple controls, because each would be on its own thread.
-ken

K M Drake
Dart Tech Support
Reply | PowerTCP Mail for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX