Path: csiph.com!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Re: Strange Delay in Page display (OT ??) Date: Mon, 25 Feb 2013 16:41:20 -0700 Lines: 54 Message-ID: References: X-Trace: individual.net /egwoEttLPaJotztzRN1Bwrc3Sb1h9VT1D/eseohtsU4NvtMon Cancel-Lock: sha1:DVOulGvx/UGMy6BxBjnW2s9E5YI= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:18631 Christoph said: > Of course this won't fit with a clean separation of model and view, so > another possibility might be to send the mail asynchronously, e.g. by > writing it to a queue which will be processed independently. > Hi Christoph: Below is the short section where I read in the form template, then fill-it in, then send it to Apache for frorwarding to my Apache server. Then, I send info down two levels to my Mail Sender to start the set up and delivering of the mail *************************************************** cFORM :=MEMOREAD(cREGCPLT) // Read-in the form template // now replace holding fields with actual user data cFORM := STRTRAN(cFORM,"#uuserid#",cUSERID) cFORM := STRTRAN(cFORM,"#upassword#",cPASSWORD) cFORM := STRTRAN(cFORM,"#uscrname#",cSCREENNAME) cFORM := STRTRAN(cFORM,"#uemail#",cEMAIL) // but don't show this on his display CGIOUT cFORM // send the form to Apache for onward transmission to the user // Now go and send the confirming email to the person who registered lMAILSENT := REGEMAIL(cUSERID,cUKEY,cPASSWORD,cSCREENNAME,cEMAIL) // two levels down is the actual hb_sendmail() function IF .NOT. lMAILSENT ERRLOG("Fail Send Email :" + cUSERID + " at " + cEMAIL) ENDIF CLOSE DATABASES RETURN NIL // and release this thread ******************************************** Instead, as you mentioned, I could set up an asynchronous process to send the email. This is easy for me to do, and I will consider doing it (i.e., starting up another 'process' to run the hb_sendmail(). I can also change the 'timeout' period I give the function to 'test' the response I get from the user's email provider. Thanks for the alternate suggestion. I'll try it. -- Mel Smith