<%@ Language="VBScript" %>
<% Option Explicit %>
<%
Dim msg, mailer, fname, init, lname, cdate
'------------------------------------------------------------>
' Get the data from the htm forms
cdate = Now()
fname = Request.Form("FirstName")
init = Request.Form("Inital")
lname = Request.Form("LastName")
' ------------------------------------------------------------>
' Format data into a message and get ready for email
msg = msg & "<h4><B>Time Stamp: </B>" & cdate & "</h4><P><B>Name:</B>"
msg = msg & lname & ", " & fname & "<BR>" & "<B>Email Address: </B> "
' ------------------------------------------------------------>
' Connect to the database and add the data to table
connStr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" _
& Server.MapPath("/path/database.mdb")
Set Rs=Server.CreateObject("ADODB.Recordset")
Rs.Open "tblYourTable", connStr, , adLockOptimistic
Rs.AddNew
fname = Rs("FirstName")
lname = Rs("LastName")
init = Rs("Initial")
cdate = Rs("TimeStamp")
Rs.Update
' ------------------------------------------------------------>
' Send the email out using Jmail
Set Mailer = Server.CreateObject("JMail.SMTPMail")
Mailer.Sender = "webmaster@YourDomain.com"
Mailer.SenderName = "Your Name"
Mailer.AddRecipient "YourEmailAdd@domain.com"
Mailer.Subject = "Client Application from the web"
Mailer.ContentType = "text/html"
Mailer.Body = msg
Mailer.Execute
Set Mailer = Nothing
Rs.Close
Set Rs = Nothing
%>