View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
You can change the script timeout for this particular script, by using the Server.AddScriptTimeout and Server.SetScriptTimeout methods, but I do not recommend this in this particular case.  A more appropriate solution would be to speed the operation up by changing how you send email.
 
The Outlook application object takes a long time to instantiate and it not recommended.  FoxWeb comes with ASPSmartMail, which is much more efficient.
 
Another possibility would be for you to use an SMTP control that supports queuing in conjunction with the IIS SMTP server.  The Dimac JMail control does this very well.  I have used JMail in the past to queue thousands of emails in just seconds.

FoxWeb Support Team
support@foxweb.com email

Sent by Larry Zhang on 12/21/2005 12:02:44 PM:
I am trying to let the web page send an email to the user.
 
When I ran this code, I ran into "Foxweb time out." error. Obviously, my mail server takes longer time to synchronize the connection. I hit the error, before the code runs through.  There is no problem in the VFP code. It just takes some time to send the mail.  How to avoid this? Anyway to run it at the back end and not let the user to wait.  Thank you.
 
 
<%
IF Request.FormCount("email") <> 0
  Select User
  locate all for UPPER(email) = UPPER(Request.Form("email"))
  IF Found()%>
      Your password will be sent to you in a few minutes.
<%
      cPWD=allt(Password)
 
      oOutlook = CreateObject('Outlook.Application')
      oMail = oOutlook.CreateItem(0)
      WITH oMail
        .Subject = "Your password"
        .Body = "Your password: "+cPWD
        .To = "
lh_zhang@yahoo.com"
   *   .Attachments.Add("C:\data\test.txt")
        .Send
       ENDWITH
   Else%>
      This email is not found.
<%Endif%>