Michael Kochendoerfer wrote: > Arno, > > if I'd do it the way you suggest (do it async, fetching the next > record > in OnRequestDone and start over sending), may I use screen output from > there,
Yes, of course, take a look at the demo. > including .ProcessMessages? No no, why would you need that? > I know that a good application > should > display information based on a timer or such, i.e. re-displaying all > info each n msecs, but for the first version, I'm very short on time > ... What do you want to display? Sure, a full log displayed in a GUI control, including all data being sent will slow down entire application since displaying data in Windows is very very slow. > > Afaik, it should be avoided to call the message pump from /*any*/ ICS > event, That's not ICS-specific, don't call the message pump from any (message- based) event handler. > or is this only true for OnDataAvailable? See above. > > Another question is, am I allowed to use .Abort from inside > OnRequestDone when an error occurs? Yes. It seems to work, but I'm quite > unsure if this is the correct way to abort a failing SMTP > transmission. What do you mean by "failing SMTP transmission"? Most error responses from a mail server should/can be handled diffently. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html > Michael > > > Arno Garrels schrieb: > >> [EMAIL PROTECTED] wrote: >> >> >>>> Hi Michael, >>>> >>>> Sorry, I sent my previous reply directly to you instead of to the >>>> list. >>>> >>>> >>>> >>>>> thanks for the hint, I already looked into the code and - by the >>>>> way - I find it very well structured. However, one question is >>>>> left. There´s always spoken about using async components, but in >>>>> my special case >>>>> >>>>> isn´t it easier to use the respective sync component? >>>>> >>>>> >>>> In this case I think you're right, and I've been known to do that >>>> in the past as well - saves having to worry about implementing >>>> timeouts because I believe there's a timeout parameter for the >>>> Sync versions of the functions. >>>> >>>> >>>> >>>>> It is quite simple: I´m opening a query on a database, iterating >>>>> through the result set and have to send one mail for each record >>>>> (= customer). I can´t advance to the next record until the mail >>>>> has been delivered, so a sync component would be (possibly?) >>>>> preferrable. And as far as I´m understanding it, I can concatenate >>>>> the sync commands rather than advancing to the next command in >>>>> OnRequestDone - am I right here? >>>>> >>>>> >>>> Yes, that's right, you can just run one command after the other, >>>> possibly with appropriate error checking as well. >>>> >>>> >> >> There's no need to use sync mode. I've done so twice in an ICS-mailer >> against a MS SQL server. In OnRequestDone do whatever you like with >> the dataset depending on current RqType and ErrCode. It gives you >> much better control! >> >> --- >> Arno Garrels [TeamICS] >> http://www.overbyte.be/eng/overbyte/teamics.html >> >> >> >> >> >>>> Regards, >>>> >>>> Bevan Edwards >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>>> -- >>>> 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 -- 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