| |
<%
if varSend = 1 then
isValid = true
errorMessage = ""
'validate form fields
if varFirstName = "" then
isValid = false
errorMessage = errorMessage & "First Name is required "
end if
if varLastName = "" then
isValid = false
errorMessage = errorMessage & "Last Name is required "
end if
if varEmail = "" then
isValid = false
errorMessage = errorMessage & "Email is required "
end if
if isValid = false then
errorMessage = "The following required fields are missing:
" & errorMessage
varSend = 0
end if
end if
if varSend <> 1 then 'dispaly form
%>
<%
else 'send message and display thank you
'REPLACE LINE RETURNS WITH HTML BREAKS
varComments = Replace(varComments, chr(10), " ")
'THE MAIL OBJECT
Dim ObjMail
Set ObjMail = CreateObject("CDO.Message")
'==This section provides the configuration information for the remote SMTP server.
'Send the message using a remote server
ObjMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
ObjMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "10.180.173.71"
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
ObjMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
'Your UserID on the SMTP server
ObjMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "website@bujiproducts.com"
'Your password on the SMTP server
ObjMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "w3bs1t3"
'Server port (typically 25)
ObjMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'Use SSL for the connection (False or True)
ObjMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
ObjMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
ObjMail.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMail.From = "website@bujiproducts.com" 'varEmail
objMail.To = "info@bujiproducts.com"
objMail.Subject = "Contact from Your Website"
objMail.HTMLBody = "First Name: " & varFirstName & " "_
& VBCrLf & "Last Name: " & varLastName & " "_
& VBCrLf & "City: " & varCity & " "_
& VBCrLf & "State: " & varState & " "_
& VBCrLf & "Email: " & varEmail & " "_
& VBCrLf & "Comments: " & varComments & " "
if varTestimonial = 1 then
objMail.HTMLBody = objMail.HTMLBody & "Post Testimonial On Website "
else
objMail.HTMLBody = objMail.HTMLBody & "DO NOT Post Testimonial On Website "
end if
if varSmartPanel = 1 then
objMail.HTMLBody = objMail.HTMLBody & "Yes, I want to be a member of büji Smart Panel "
else
objMail.HTMLBody = objMail.HTMLBody & "No, I DO NOT want to be a member of büji Smart Panel "
end if
objMail.Send
Set objMail = Nothing
Set objConfig = Nothing
%>
| |
Your email has been sent. Thank you for contacting büji.
|
<%
end if
%>
|
|