Indy uses blocking sockets - if it didn't, it wouldn't be as easy to work with. The down side is that if you call into an Indy client from the main thread of your app, then that main thread blocks until the Indy call completes. In a GUI app that means no message processing and therefore an apparent "freeze".
One solution is to make all your Indy calls on a background thread. But if putting your Indy calls into a worker thread is too complex/not practical in your case, then you might have some luck with the "AntiFreeze" component of Indy itself: http://www.indyproject.org/docsite/html/frames.html?frmname=topic <http://www.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=i ndex.html> &frmfile=index.html NOTE: I do all my Indy work in threads so have no direct experience of using AntiFreeze, I just knew it existed. I hope it helps. From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Jeremy Coulter Sent: Tuesday, 12 July 2011 14:36 To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Email/SMTP code Indy works, but I hate the way it hold up your app. while it sends the emails ! I dont know what it is, I have asked question, researched, all sorts of things, but indy sending emails in apps, especially if are trying to do it as a sperate task to the main running task AND in a thread, it still "appears" to lock the app. up until its sent the email or timed out...grrr I have ditched it now...almost.... Jeremy On Tue, Jul 12, 2011 at 2:05 PM, Stefan Mueller <muell...@orcl-toolbox.com> wrote: Most ISP's nowadays block traffic on port-25 (except to their own mail servers). Helps with infected zombie computers that send out tons of SPAM mails. Regards, Stefan From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of John Bird Sent: Tuesday, July 12, 2011 10:47 AM To: NZ Borland Developers Group - Delphi List Subject: [DUG] Email/SMTP code Anyone got a recommendation for the best (free) code/samples to drive Indy10 for sending an email with attachment -Indy10.2.3 -Send attachment -SMTP server and email addresses will be known I have tried a couple (eg AtoZed SendMail example) but it seems to time out connecting to the SMTP John _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
_______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe