%
'
On Error Resume Next
Dim objAMSession
' This should occur at the top of the script. If the AM session does not
' exist and the URL does not contain server and mailbox data, a logon form will be
' emited and returned for the user to fill out.
CheckAMSession 'AuthLogon.inc
' After calling CheckAMSession, the AM session can be retrieved from
' Session("AMSession"). CheckAMSession may have failed to create a session, though,
' so check whether objAMSession is Nothing and if so cleanup, inform the user, etc.
Set objAMSession= Session( "AMSession")
if objAMSession Is Nothing Then
' CheckSession was unable to retrieve or create a session
Response.Write( "GetAMSession returned nothing!
")
End If
GetMessageInfo objAMSession 'SendMail.inc
%>