<% ‘EMAIL FORM USING CLASSIC ASP AND CDONTS Dim varName, varEmail, varCompany, varTelephone, varComments, varSend, thisPage varName = Request.Form("txtName") varEmail = Request.Form("txtEmail") varCompany = Request.Form("txtCompany") varTelephone = Request.Form("txtPhone") varComments = Request.Form("txtComments") varSend = Request.Form("send") thisPage = Request.ServerVariables("SCRIPT_NAME") If not varSend = 1 Then 'OUTPUT THE CONTACT FORM %> NHSSV - Contact Us - eMail Us
About NHSSV Products & Services Partners Homebuyers Resources Volunteer Contact NHSSV

Home > Contact Us

Contact Us

Feel free to contact us using this web form

 

Name:  
Company:  
email:  
Telephone:  
Comments:  
     
 
Copyright 2005
 
<% Else 'SEND MAIL AND OUTPUT THANK YOU RESPONSE ‘REPLACE LINE RETURNS WITH HTML BREAKS varComments = Replace(varComments, chr(10), "
") ‘THE MAIL OBJECT Dim ObjMail Set ObjMail = Server.CreateObject("CDO.Message") Set objConfig = CreateObject("CDO.Configuration") 'Configuration: objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort objConfig.Fields(cdoSMTPServer) = "localhost" objConfig.Fields(cdoSMTPServerPort) = 25 objConfig.Fields(cdoSMTPAuthenticate) = cdoBasic 'Update configuration objConfig.Fields.Update Set objMail.Configuration = objConfig objMail.From = varName & " <" & varEmail & ">" objMail.To = "laolagi@sbcglobal.net." ‘Add your email address objMail.Subject = "Contact from NHSSV Website" objMail.HTMLBody = varName & "
"_ & VBCrLf & varCompany & "
"_ & VBCrLf & varTelephone & "
"_ & CBCrLf & varComments & "
" objMail.Send Set objMail = Nothing Set objConfig = Nothing ‘AND OUTPUT THANK YOU Response.Write "Hey "& varName & ",
"_ & VBCrLf & "Thanks for your feedback.
"_ & VBCrLf & "We’ll contact you as soon as possible!" End If %>