× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Victor,

It's hard to see how a sleep() call would help in sending an e-mail? I could see using delays like this if you're using QtmmSendMail(), since that program hands the file off to a background job which may take a moment to handle the file

But if you're coding an SMTP client (i.e. coding your own SMTP routine with the socket API) this should be a non-issue? Unless something strange is going on?

-SK

On 10/15/2012 1:45 PM, Victor Hunt wrote:
I've run across an RPG program that uses socket APIs to send an email. Once
the socket is setup and opened, the program uses a subroutine to do all the
send/receive functions. Just after the send, the subroutine runs the sleep
API with a parameter of 1 second. It appears the original intent was to
give the email server and/or network time to produce/deliver a response
before the receive API runs. Does anyone think this built in delay is
really necessary? Depending on what is being sent, this program can run for
a very long time with these roughly 1 second delays. Also, the program
doesn't do anything with the received data collected after the send API. Is
it really necessary to do a receive after a send? Seems I can tighten this
up a bit.

Thanks,

Vic


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.