Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Session_OnEnd in global.asa
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

neerajdeo
Starting Member

USA
33 Posts

Posted - 30 April 2001 :  16:01:52  Show Profile  Visit neerajdeo's Homepage  Send neerajdeo a Yahoo! Message
Hi
I am having some small problem in sending an automated mail when the user's session is timed out

the code in global.asa is

Session_OnEnd
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strSubject

strFrom="deo@usc.edu"
strTo="deo@usc.edu"
strSubject = "Star Survey results"

strBody= "something"

Set myCDONTSMail = CreateObject("CDONTS.NewMail")

myCDONTSMail.Send strFrom,strTo,strSubject,strBody

Set myCDONTSMail = Nothing
end sub

the above code works in other asp pages

Is it because I cant do this when the session expires

Thanks
Neeraj



Edited by - neerajdeo on 30 April 2001 16:02:44

redbrad0
Advanced Member

USA
3725 Posts

Posted - 30 April 2001 :  17:17:14  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I know I read somewhere that not all code works in the global.asa file. Im thinking that creating an object for an email would be one of those, but dont hold me 2 it. Maybe someone else can clarify.

Brad
Go to Top of Page

RaiderUK
Average Member

United Kingdom
577 Posts

Posted - 30 April 2001 :  18:56:32  Show Profile  Send RaiderUK a Yahoo! Message
ASPEmail works fine for me in global.asa.

Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 30 April 2001 :  22:06:02  Show Profile
What is the problem? You can't totally rely on Session_OnEnd firing. Maybe your code never gets run.


======
Doug G
======
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 01 May 2001 :  04:45:49  Show Profile  Visit Kat's Homepage
I had problems with getting the session on_end code to fire, even if I called it. IMHO It is best to find another place to do what you need.

KatsKorner
Go to Top of Page

neerajdeo
Starting Member

USA
33 Posts

Posted - 01 May 2001 :  15:40:05  Show Profile  Visit neerajdeo's Homepage  Send neerajdeo a Yahoo! Message
quote:

What is the problem? You can't totally rely on Session_OnEnd firing. Maybe your code never gets run.


======
Doug G
======


quote:

What is the problem? You can't totally rely on Session_OnEnd firing. Maybe your code never gets run



Well it doesnt work even if i explicitly call call this via session.abandon.


Go to Top of Page

Sencer
Starting Member

Denmark
6 Posts

Posted - 01 May 2001 :  18:42:29  Show Profile  Visit Sencer's Homepage
Hi
You cannot call the MapPath method in the Session_OnEnd script.

http://msdn.microsoft.com/library/psdk/iisref/glob2y90.htm

www.tf2bunker.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07