%@ Language=VBScript %> <% Function GetItem(data) Dim item : item = Request.QueryString(data) If item = "" Then item = Request.Form(data) End If GetItem = item End Function Function QueryAndSendMail(Name, Subject, Email, Body) Name = GetItem("MailName") Subject = GetItem("MailSubject") Email = GetItem("MailEmail") Body = GetItem("MailBody") If Len(Name) = 0 And Len(Subject) = 0 And Len(Email) = 0 And Len(Body) = 0 Then QueryAndSendMail = "" ElseIf Len(Name) > 50 Or Len(Name) < 1 Then QueryAndSendMail = "Your name has to be between 1 and 20 characters long" ElseIf Len(Subject) > 50 Or Len(Subject) < 1 Then QueryAndSendMail = "Your Subject has to be between 1 and 50 characters long" ElseIf Len(Email) > 50 Or Len(Email) < 1 Then QueryAndSendMail = "Your Email has to be between 1 and 50 characters long" ElseIf Instr(Email, "@") = 0 Or Instr(Email, ".") = 0 Then QueryAndSendMail = "You need to enter a valid Email address" ElseIf Instr(Email, "@") > Instr(Email, ".") Then QueryAndSendMail = "You need to enter a valid Email address" ElseIf Len(Body) > 2000 Or Len(Body) < 1 Then QueryAndSendMail = "Your message has to be betwen 1 and 2000 characters long" Else Dim cdo : Set cdo = Server.CreateObject("CDONTS.NewMail") Call cdo.Send(Email, "sam74@galenorn.com", "From " & Name & ", " & Subject, Body) Set cdo = Nothing QueryAndSendMail = "Your message has been successfully sent" Name = "" Subject = "" Email = "" Body = "" End If End Function %>


I use a contact form to prevent my email address from being spidered and spammed. Please fill out the fields below and press "submit". I will contact you as soon as possible from my home address. Thank you.
<% Dim Name, Subject, Email, Body Dim Action : Action = QueryAndSendMail(Name, Subject, Email, Body) Response.Write("" & Action & "
" & vbCrLf) %>