%@ Language=VBScript %>
<% if Request.Form("B1") = "Submit Feedback" then strName = Trim(Request.Form("Name") & "") strCompany = trim(Request.Form("Company") & "") strEmail = Trim(Request.Form("Email") & "") strPhone = Trim(Request.Form("Telephone") & "") strFax = Trim(Request.Form("Fax") & "") strSubject = Trim(Request.Form("Category") & "") strMessage = Trim(Request.Form("Comments") & "") if len(strName) = 0 then strOutMessage = "Your Name is required for the information to be sent, please try again" elseif len(strPhone) = 0 then strOutMessage = "Your Telephone Number is required for the information to be sent, please try again" elseif len(strEmail) = 0 then strOutMessage = "Your Email Address is required for the information to be sent, please try again" elseif len(strMessage) = 0 then strOutMessage = "A message is required for the information to be send, please enter the message to be sent" elseif len(strName) > 0 and len(strPhone) > 0 and len(strEmail) > 0 and len(strMessage) > 0 then theSchema="http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig=server.CreateObject("CDO.Configuration") cdoConfig.Fields.Item(theSchema & "sendusing")= 2 cdoConfig.Fields.Item(theSchema & "smtpserver")="smtp.dslextreme.com" cdoConfig.Fields.Update Set oMail = Server.CreateObject("CDO.Message") oMail.Configuration=cdoConfig oMail.From = strEmail oMail.To = "sergiob@neilmarq.com" oMail.Cc = "milton@mrpctech.com" oMail.Subject = "Website Feedback" oMail.TextBody = "The following feedback has been sent from the 'Contact Us' form on Neilmarq's Website: " & VBCrLf & VBCrLf & "Name: " & strName & VBCrLf & "Phone: " & strPhone & VBCrLf & "Fax: " & strFax & VBCrLf & "Email: " & strEmail & VBCrLf & "Subject: " & strSubject & VBCrLf & VBCrLf & strMessage oMail.Send oMail.From = "sergiob@neilmarq.com" oMail.To = strEmail oMail.Cc = "" oMail.Subject = "Neilmarq Corporation" oMail.TextBody = "Thank you for visiting our website, your information has been sent to Neilmarq Corporation. If you have any questions please feel free to call us at (310) 559-6070." & VBCrLf & VBCrLf & "Thank You" oMail.Send Set oMail = Nothing If Err.Number <> 0 then strOutMessage = "There was an error processing your request. Please email sergiob@neilmarq.com for more information" Else strOutMessage = "Thank you for your feedback, You will be contacted promptly. You will receive a confirmation email soon." strLink = "" End if end if else strOutMessage = "Please tell us what you think about our web site, company, products, or services. We will get back to you promptly" end if Set objMail = Nothing %>
|