Solved

Jmail / Timeout error

Posted on 2004-09-19
2
972 Views
Last Modified: 2012-06-27
Having a problem:
Client says: I am trying to send an e mail to all member in a group and after 2 minutes I get this message:

email: to members in selected group
Active Server Pages error 'ASP 0113'

Script timed out

/classregistration/cms/email.asp

The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.

What does it mean?  Are all my e mails getting through?  I have called some people and some told me they have received it and some told me they haven't.  

In the email.asp:
<script language="JavaScript">
      function DoSubmit(op) {
            document.frmEmail.op.value = op;
            document.frmEmail.submit();
      }
</script>
<%
CheckPermissionCMS(SITEOWNER)

dim op, id, rs, res, message, errmessage, emailsubject, emailbody
op = Request.Form("op")
emailsubject = Request.Form("emailsubject")
emailbody = Request.Form("emailbody")
if op = "m" then 'send email to one member
      id = Request.Form("memberID")
      if not isNumeric(id) then
            rw "Invalid member ID"
            re
      end if
      'rw "email: to selected member"
      SendBulkMessageByID id, emailsubject, emailbody
elseif op = "g" then 'send email to one group
      id = Request.Form("groupID")
      rw "email: to members in selected group"
      SendBulkMessageByGroup id, emailsubject, emailbody
elseif op = "a" then 'send email to all members
      rw "email: to all members"
      SendBulkMessageAll emailsubject, emailbody
end if
set rs = GetMemberListBrief
%>
<br>
<form name="frmEmail" action="email.asp" method="post">
<input type="hidden" name="op" value="">
<table class="formTable" cellpadding="5" cellspacing="0" border="0" align="center" width='50%'>
      <tr><td class="formTitle">Send bulk email</td></tr>
      <%if message <> "" then%>
      <tr><td colspan="2" class="message"><%=message%></td></tr>
      <%elseif errmessage <> "" then%>
      <tr><td colspan="2" class="errmessage"><%=errmessage%></td></tr>
      <%end if%>
      <tr><td>&nbsp;</td></tr>
      <tr>
            <td width="100%">
                  <table cellspacing="0" cellpadding="5" width="100%" border="0">
                        <tr>
                              <td colspan="2" align="center"><input type="text" class="text" name="emailsubject" size="60" value="write email subject here"></td>
                        </tr>
                        <tr>
                              <td colspan="2" align="center"><textarea name="emailbody" class="text" rows="5" cols="60">write email message here</textarea>
                        </tr>
                        <tr>
                              <td width="50%" align="center"><select name="memberID"><%GenerateCombo rs, "memberID", "MemberName", "text"%></select></td>
                              <td width="50%" align="center"><select name="groupID"><%GenerateGroupCombo ""%></select></td>
                        </tr>
                        <tr>
                              <td width="50%" align="center"><input type="button" value="Send to member" onClick="javascript:DoSubmit('m');"></td>
                              <td width="50%" align="center"><input type="button" value="Send to group" onClick="javascript:DoSubmit('g');"></td>
                        </tr>
                        <tr><td colspan="2">&nbsp;</td></tr>
                        <tr>
                              <td colspan="2" align="center"><input type="button" value="Send to all members" onClick="javascript:DoSubmit('a');"></td>
                        </tr>
                  </table>
            </td>
      </tr>
</table>
<%set rs = nothing%>

Any suggestions or should I use nother form handler or add something?

Thanks!

-Corey
0
Comment
Question by:coreybryant
2 Comments
 
LVL 8

Accepted Solution

by:
a_twixt_in_the_tale earned 500 total points
ID: 12100273
ur SendBulkMessage functions mite b taking a long time in running.
so if you have set a timeout for the script, this would cause ur asp script to timeout and stop.

Could you check ur passed list and the list of ppl who hv got the mails. if these ppl r the ones at the top of the list (ie ones processed first) this is most likely ur problem

To increase the script timeout using IIS Admin tools (You need to be logged in as someone with admin rights I guess)
Go to IIS > Default Web Site > Properties <right click> > Home Directory <tab> > Configuration <button>  > App Options <tab> > ASP Script timeout - increase this
Set it a bigger number (setting it to 0 means the script never times out)

or set Server.ScriptTimeout to a high value (ive nvr tried this though :))

:)
Don
0
 
LVL 29

Author Comment

by:coreybryant
ID: 12101020
Thanks - that should be of some help also!

-Corey
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question