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 component does all the remaining things in the background (in the OnRequestDone event, the same way the example shows).
Sending one mail is fine, but sending mass mails gives an 'SMTP component not ready' exception. I can't track it down, so I guess I'm making some common mistake here. My application works as follows. After pressing a button to start sending mass mails, the app opens a query on a SQL server and iterates through the record set. It takes some data from the record set and places it into properties of my own mail component. Then it calls a method 'MailSend', which in turn fills all TSmtpCli properties and 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. The last thing I did is to place initialization of the standard properties into my MailSend method, setting CharSet, ContentType, Port, LocalAddr... there. But no success, the exception still remains. I guess I missed something obvious - and I'm happy for all hints to solve this problem. TIA, Michael -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be