Re: [twsocket] Still problems while sending SMTP

2007-01-18 Thread Francois Piette
Regarding my last mail ('SMTP component not ready' exception), I learnt that the problem doesn't occur if I put the whole 'case RqType of: .. end;' into a try..except and simply ignore the exception. But I'm not sure if this is the correct way to handle it. I haven't read the whole message

Re: [twsocket] Still problems while sending SMTP

2007-01-17 Thread Arno Garrels
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of DZ-Jay Sent: Tuesday, January 16, 2007 10:57 AM To: ICS support mailing Subject: Re: [twsocket] Still problems while sending SMTP On Jan 16, 2007, at 02:49, Arno Garrels wrote: When the response

Re: [twsocket] Still problems while sending SMTP

2007-01-17 Thread Kochendoerfer, Michael
17, 2007 9:24 AM To: ICS support mailing Subject: Re: [twsocket] Still problems while sending SMTP In order to reconnect safely you need to get out of your loop after the session has been closed AND after OnRequestDone has been triggered RqType smtpQuit as well. You must assign event

Re: [twsocket] Still problems while sending SMTP

2007-01-17 Thread Arno Garrels
Of Arno Garrels Sent: Wednesday, January 17, 2007 9:24 AM To: ICS support mailing Subject: Re: [twsocket] Still problems while sending SMTP In order to reconnect safely you need to get out of your loop after the session has been closed AND after OnRequestDone has been triggered RqType smtpQuit

Re: [twsocket] Still problems while sending SMTP

2007-01-17 Thread Kochendoerfer, Michael
, 2007 3:29 PM To: ICS support mailing Subject: Re: [twsocket] Still problems while sending SMTP Arno, now I implemented it all the way you suggested. I have a message handler procedure, which decides whether a record results in a mail or in a print job. It then calls either

Re: [twsocket] Still problems while sending SMTP

2007-01-17 Thread Arno Garrels
10:55 AM To: ICS support mailing Subject: Re: [twsocket] Still problems while sending SMTP Kochendoerfer, Michael wrote: Arno, I think you addressed the problem correctly ;) All subsequent Connect() calls (except the first one) are located within the OnRequestDone event procedure

Re: [twsocket] Still problems while sending SMTP

2007-01-17 Thread Michael Kochendoerfer
Sent: Wednesday, January 17, 2007 10:55 AM To: ICS support mailing Subject: Re: [twsocket] Still problems while sending SMTP Kochendoerfer, Michael wrote: Arno, I think you addressed the problem correctly ;) All subsequent Connect() calls (except the first one) are located within

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread DZ-Jay
On Jan 16, 2007, at 02:49, Arno Garrels wrote: When the response to the Quit command is received the connection (may) still be alive. So watch both, whether Quit response has been received as well as the SessionClose event. Call connect only after the session has been closed. Don't start a

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Kochendoerfer, Michael
Sent: Tuesday, January 16, 2007 10:57 AM To: ICS support mailing Subject: Re: [twsocket] Still problems while sending SMTP On Jan 16, 2007, at 02:49, Arno Garrels wrote: When the response to the Quit command is received the connection (may) still be alive. So watch both, whether Quit

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Arno Garrels
Subject: Re: [twsocket] Still problems while sending SMTP On Jan 16, 2007, at 02:49, Arno Garrels wrote: When the response to the Quit command is received the connection (may) still be alive. So watch both, whether Quit response has been received as well as the SessionClose event. Call

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Wilfried Mestdagh
Hello Michael, In addition to the reply of Arno: Currently, I have a loop after calling Connect() looking like this: while not FlagDone do begin Sleep(50); end; If this works then be aware that you call connect in another thread as the thread where the component is executing. Maybe it is

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Michael Kochendoerfer
Wilfried, my app is just single-threaded. The design doesn't require multithreading because each mail is sent when the previous one has been delivered. But you gave me another idea for another part of my app ;) I think that all ideas I collected from Arno and all other contributors will help

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Angus Robertson - Magenta Systems Ltd
my app is just single-threaded. The design doesn't require multithreading because each mail is sent when the previous one has been delivered. You still don't need threads to handle parallel delivery, just create an array of say 50 SMTP components, and queue mail to the next free one.

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread Michael Kochendoerfer
: [twsocket] Still problems while sending SMTP On Jan 16, 2007, at 02:49, Arno Garrels wrote: When the response to the Quit command is received the connection (may) still be alive. So watch both, whether Quit response has been received as well as the SessionClose event. Call connect only

Re: [twsocket] Still problems while sending SMTP

2007-01-16 Thread david . lyon
the message pump here Sleep(50); end; Any thoughts? TIA, Michael -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of DZ-Jay Sent: Tuesday, January 16, 2007 10:57 AM To: ICS support mailing Subject: Re: [twsocket] Still problems while sending SMTP

[twsocket] Still problems while sending SMTP

2007-01-15 Thread Michael Kochendoerfer
Dear community, it's me again ... some of you directed me the right way sending SMTP mails in async mode. I analyzed the MailSnd1 example and I built a component based on TSmtpCli, which wraps some of my application specific data. After setting all required properties, I do a Connect and the

Re: [twsocket] Still problems while sending SMTP

2007-01-15 Thread david . lyon
Quoting Michael Kochendoerfer [EMAIL PROTECTED]: it's me again ... some of you directed me the right way sending SMTP mails in async mode. I analyzed the MailSnd1 example and I built a component based on TSmtpCli, which wraps some of my application specific data. After setting all required

Re: [twsocket] Still problems while sending SMTP

2007-01-15 Thread Arno Garrels
Michael Kochendoerfer wrote: calls .Connect. I can see in a log that OnRequestDone is fired multiple times until it gets smtpQuit. When calling the next time, I'll get the above exception. When the response to the Quit command is received the connection (may) still be alive. So watch both,