Page 1 of 1

Sockets and Timeouts

Posted: Thu Oct 20, 2011 1:02 pm
by spelman
Hello all,

I have a question regarding sockets and a possible timeout

The background to this is that I want to send an email from my application.
Using the Sendmail application as a sample,I pulled out the basics of how to
send the mail - and it works great.

However, I'm using a Wifi link which can be a bit flakey, so if this drops connection while
the email is being sent, then the application hangs.

So, my question is, can an SMTP socket used for email have a timeout attached ?
or, would a do events statement somewhere help ?

Kind Regards from a very happy HMG user

Re: Sockets and Timeouts

Posted: Thu Oct 20, 2011 6:37 pm
by gfilatov
spelman wrote:Hello all,
...
So, my question is, can an SMTP socket used for email have a timeout attached ?
or, would a do events statement somewhere help ?
Hello,

Thanks for your request!

It will be available at the next Extended build (added a new method SetSendTimeout( nMilliSec ) to TSMTP class).

BTW DO EVENTS statement don't help in this case.

Re: Sockets and Timeouts

Posted: Fri Oct 21, 2011 7:52 am
by spelman
That's brilliant - Thankyou very much