%@LANGUAGE="VBSCRIPT"%>
![]() |
![]() |
||||||||||
|
<%
blForceSave = Request.Form("blForceSave")
Name = Trim(Request.Form("Name"))
Company = Trim(Request.Form("Company"))
ActivityField = Trim(Request.Form("ActivityField"))
Position = Trim(Request.Form("Position"))
Email = Trim(Request.Form("Email"))
Tel = Trim(Request.Form("Tel"))
Fax = Trim(Request.Form("Fax"))
Commodity = Trim(Request.Form("Commodity"))
Quantity = Trim(Request.Form("Quantity"))
PaymentTerm = Trim(Request.Form("PaymentTerm"))
PortOfDelivery = Trim(Request.Form("PortOfDelivery"))
Notify = Trim(Request.Form("Notify"))
Buyer = Trim(Request.Form("Buyer"))
Comments = Trim(Request.Form("Comment"))
Dim aryItemvalid(10)
aryItemvalid(0) = true
aryItemvalid(1) = true
aryItemvalid(2) = true
aryItemvalid(3) = true
aryItemvalid(4) = true
aryItemvalid(5) = true
aryItemvalid(6) = true
aryItemvalid(7) = true
aryItemvalid(8) = true
aryItemvalid(9) = true
if (blForceSave = "true") then
blDataValid = true
if (Name = "") then
aryItemvalid(0) = false
end if
if (Company = "") then
aryItemvalid(1) = false
end if
if (Email = "") then
aryItemvalid(2) = false
end if
if (Tel = "") then
aryItemvalid(3) = false
end if
if (Fax = "") then
aryItemvalid(4) = false
end if
if (Commodity = "") then
aryItemvalid(5) = false
end if
if (Quantity = "") then
aryItemvalid(6) = false
end if
if (PaymentTerm = "") then
aryItemvalid(7) = false
end if
if (PortOfDelivery="") then
aryItemvalid(8) = false
end if
if (Notify = "") then
aryItemvalid(9) = false
end if
for i=0 to 9
if (aryItemvalid(i) = false) then
blDataValid = false
end if
next
if (blDataValid = true) then
strBodyMail= ""
strBodyMail = strBodyMail & "Name: " & Name & VbCrLf
strBodyMail = strBodyMail & "Company: " & Company & VbCrLf
strBodyMail = strBodyMail + "Field of activity/ industry: " & ActivityField & VbCrLf
strBodyMail = strBodyMail + "Position: " & Position & VbCrLf
strBodyMail = strBodyMail + "Email: " & Email & VbCrLf
strBodyMail = strBodyMail + "Tel: " & Tel & VbCrLf
strBodyMail = strBodyMail + "Fax: " & Fax & VbCrLf
strBodyMail = strBodyMail + "Commodity: " & Commodity & VbCrLf
strBodyMail = strBodyMail + "Quantity: " & Quantity & VbCrLf
strBodyMail = strBodyMail + "PaymentTerm: " & PaymentTerm & VbCrLf
strBodyMail = strBodyMail + "Port of delivery & discharge: " & PortOfDelivery & VbCrLf
strBodyMail = strBodyMail + "Notify part/bank details: " & Notify & VbCrLf
strBodyMail = strBodyMail + "Consignee/buyer: " & Buyer & VbCrLf
strBodyMail = strBodyMail + "Comments: " & Comments & VbCrLf
'inquiry mailed
Set Mailer = Server.CreateObject("JMail.SMTPMail")
Mailer.Sender= Email
Mailer.ServerAddress = "mail.farinamchemie.com"
Mailer.AddRecipient "sales@farinamchemie.com"
Mailer.Subject = "Inquiry"
Mailer.Body = strBodyMail
Mailer.Execute
'auto responder
strAutoresponderMsg = "Dear " & Name & ", " & VbCrLf & VbCrLf & "Thank you for your inquiry." & VbCrLf & "We will process your inquiry and inform you"
strAutoresponderMsg = strAutoresponderMsg & " as soon as possible." & VbCrLf & VbCrLf & VbCrLf & " Regards, "& VbCrLf & " Farinam Chemie Sales "
strAutoresponderMsg = strAutoresponderMsg & "Department. " & VbCrLf
strAutoresponderMsg = strAutoresponderMsg & "------------------------------------------"& VbCrLf & "No.16, Modaress Freeway, Steadler Bldg., "
strAutoresponderMsg = strAutoresponderMsg & "Suite No. 5, Tehran 19666 - Iran"& VbCrLf & "P . O . Box: 19395/6517" & VbCrLf
strAutoresponderMsg = strAutoresponderMsg & "Tel: (9821)201 1541 - 201 1581"& VbCrLf & "Fax: (9821) 201 1660" &VbCrLf
strAutoresponderMsg = strAutoresponderMsg & "URL: www.farinamchemie.com" & VbCrLf & "General information: info@farinamchemie.com" & VbCrLf
strAutoresponderMsg = strAutoresponderMsg & "Sales departement: sales@farinamchemie.com"
Mailer.Sender= "sales@farinamchemie.com"
Mailer.ServerAddress = "mail.farinamchemie.com"
Mailer.AddRecipient Email
Mailer.Subject = "Thank you for your inquiry"
Mailer.Body = strAutoresponderMsg
Mailer.Execute
Response.write " Thank you for your inquiry. We will process your inquiry very soon.
|
||||||||||
|
|||||||||||