global.asa and Jmail

Results 1 to 2 of 2

Thread: global.asa and Jmail

  1. #1
    Join Date
    Dec 1969

    Default global.asa and Jmail

    Does anyone have any experience in executing a JMail script with the session_Onstart sub in the global.asa<BR><BR>I have verified that global.asa session_OnStart is firing with a quick active session counter but whe I go to process a "verfied functional" JMail script I get nothing..<BR><BR>Any helo would be greatly appreciated, past the dead line.:(<BR><BR>asa is below<BR><BR>&#060;SCRIPT LANGUAGE="VBScript" RUNAT="Server"&#062;<BR><BR>Sub Application_OnStart()<BR> &#039 Set our user count to 0 when we start the server<BR> Application("ActiveUsers") = 0<BR>End Sub<BR><BR>Sub Session_OnStart()<BR> &#039 Change Session Timeout to 1 minutes (if you need to)<BR> Session.Timeout = 5<BR> &#039 Set a Session Start Time<BR> &#039 This is only important to assure we start a session<BR> Session("Start") = Now()<BR> &#039 Increase the active visitors count when we start the session<BR> Application.Lock<BR> Application("ActiveUsers") = Application("ActiveUsers") + 1<BR> Application.UnLock<BR> <BR> Set JMail = Server.CreateObject("JMail.SMTPMail")<BR> JMail.ServerAddress = ""<BR> JMail.Subject = "starting...."<BR> JMail.Sender = ""<BR> JMail.AddRecipient ""<BR> JMail.Body = "Current System Time: "& now() & vbCRLF<BR> JMail.Priority = 3<BR> JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")<BR> JMail.Execute<BR> <BR>End Sub<BR><BR>Sub Session_OnEnd()<BR> &#039 Decrease the active visitors count when the session ends.<BR> Application.Lock<BR> Application("ActiveUsers") = Application("ActiveUsers") - 1<BR> Application.UnLock<BR>End Sub<BR><BR>&#060;/SCRIPT&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: global.asa and Jmail

    Hi,<BR><BR>Never tried this combination, but you are limited on what objects you can call from the global.asa file. So I wouldn&#039t be surprised if it won&#039t work. Check the objects reference link on this page - it might has some info on what you can call from the asa file?<BR><BR>DC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts