<% Option Explicit Response.Buffer=True 'On Error Resume Next 'This function is used to generate email on error. Private Function MailIt(byVal classstring, byVal mailto, _ byVal mailfrom, byVal mailsubject, byVal mailbody) Dim Mailer, objCDO Select Case LCase(classstring) Case "jmail.smtpmail" On Error Resume Next Set Mailer = Server.CreateObject("jmail.smtpmail") With Mailer .ServerAddress = "entermailserveraddresshere" .Sender = mailfrom .AddRecipient mailto .Subject = mailsubject .Body = mailbody .Execute End With If Err Then MailIt = False Else MailIt = True End If Set Mailer = Nothing On Error GoTo 0 Case "cdonts.newmail" On Error Resume Next Set objCDO = Server.CreateObject("CDONTS.NewMail") With objCDO .Subject = mailsubject .To = mailto .From = mailfrom .Body = mailbody .Send End With If Err Then MailIt = False Else MailIt = True End If Set objCDO = Nothing On Error GoTo 0 Case Else MailIt = False Err.Raise 5030, "MailIt Function", _ "Unknown class string argument. " & _ "The MailIt function does " & _ "not support this mail object." End Select End Function Dim oConn,ORset,sqlstmt Dim LoanClosetID,Name,Description,Description2,ServiceArea,Region,Website,ContactName,AgencyName,StreetAddress,City,State,Zip,Phone,TTY,Fax,Email Dim nFS,nF,nDate,nndate Dim boolSent Const UseCDO = "cdonts.newmail" Dim bodyMessage Sqlstmt = "Select * from [qryLoanCloset] order by Region" 'Sqlstmt = "Select * from [qryLoanCloset]" Set oConn = Server.CreateObject("ADODB.Connection") oConn.open = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("loancloset.mdb") 'oConn.open "loancloset" 'oConn.open "loancloset" Set oRset = oConn.Execute(Sqlstmt) 'set nFS = server.CreateObject("Scripting.FileSystemObject") 'set nF = nFS.GetFile(server.MapPath("LoanCloset.mdb")) 'set nF = nFS.GetFile(server.MapPath("dsn/read/LoanCloset.mdb")) 'nDate = datevalue(nF.DateLastModified) 'nndate = nF.DateLastModified If err.Number <> 0 Then oConn.close Set oConn = Nothing Set oRset = Nothing 'bodyMessage is used to string together a message for the email message area bodyMessage = " " bodyMessage = "An error has occurred in the Loan Closet Application" & vbcrlf & vbcrlf & "Number = " & err.Number & vbcrlf & "Description = " & err.Description & vbcrlf & "Source = " & err.Source err.Clear 'this is where the MailIt function is used/called boolSent = MailIt(UseCDO, "Diane.Wideman@oa.mo.gov", "Sandy.Oidtman@oa.mo.gov", "LoanCloset Error Alert", bodyMessage) If boolSent Then Response.redirect "snsEmailSent.htm" Else Response.redirect "snsunavailable.htm" end if End If 'Response.Write "Number = " & err.Number & "

" 'Response.Write "Description = " & err.Description & "

" 'Response.Write "Source = " & err.Source 'err.Clear %> Missouri Assistive Technology <% Response.Write "

Swap n' Shop Loan Closet


" if oRset.EOF and oRset.BOF then Response.Write "Loan Closet
" Response.Write "No Agencies Found At This Time.
" else Do Until oRset.EOF Response.Write "

" & oRset("Region").value & "

" Response.Write "

" & oRset("Name").value & " -- " & oRset("AgencyName").value & "

" Response.Write "" Response.Write "" Response.Write "" 'if oRset("Description2").value > " " then 'Response.Write " " & oRset("Description2").value & "" 'else 'Response.Write "" 'end if Response.Write "" if oRset("WebSite").value > " " then Response.Write "
" end if Response.Write "
Service Area: " & oRset("ServiceArea").value & "
Description: " & oRset("Description").value & " 
Website: " & oRset("Website").value & "
" Response.Write "" 'Response.Write "
" 'Response.Write "
" Response.Write "
Contact Information:                                     
" & oRset("ContactName").value & "
" Response.Write oRset("StreetAddress").value & "
" if oRset("City").value > " " then Response.Write oRset("City").value & ", " & oRset("State").value & "," & oRset("Zip").value & "
" else if oRset("State").value > " " then Response.Write oRset("City").value & ", " & oRset("State").value & "," & oRset("Zip").value & "
" else end if end if 'Response.Write "
" dim Format_Phone if oRset("Phone").value > " " then Format_Phone = "(" & mid(oRset("Phone"),1,3) & ")" & Mid(oRset("Phone"),4,3) & "-" & Mid(oRset("Phone"),7,4) Response.Write "Phone:   " & Format_Phone & "
" else Response.Write "Phone:   N/A
" end if dim Format_TTY if oRset("TTY").value > " " then Format_TTY = "(" & mid(oRset("TTY"),1,3) & ")" & Mid(oRset("TTY"),4,3) & "-" & Mid(oRset("TTY"),7,4) Response.Write "TTY:        " & Format_TTY & "
" else Response.Write "TTY:        N/A
" end if dim Format_Fax if oRset("Fax").value > " " then Format_Fax = "(" & mid(oRset("Fax"),1,3) & ")" & Mid(oRset("Fax"),4,3) & "-" & Mid(oRset("Fax"),7,4) Response.Write "Fax:        " & Format_Fax & "
" else Response.Write "Fax:        N/A
" end if Response.Write "Email:     " & oRset("Email") & "" Response.Write "" 'Response.Write "" Response.Write "
" oRset.MoveNext Loop End if oConn.close Set oConn = Nothing Set oRset = Nothing %>

Email Contact Information: matpmo@swbell.net