%@ Language=VBScript %> <% if isempty(Request.Form("Submit")) then TheMessageNo = 1 TheWantReports = "Yes" else TheMessageNo = 2 TheName = Request.Form("Name") TheEmailFrom = Request.Form("EmailFrom") TheEmailFrom2 = Request.Form("EmailFrom2") TheAddress = Request.Form("Address") TheAddress2 = Request.Form("Address2") TheCity = Request.Form("City") TheState = Request.Form("State") ThePostCode = Request.Form("PostCode") TheCountry = Request.Form("Country") TheTelephone = Request.Form("Telephone") TheComment = Request.Form("Comment") if trim(Request.Form("Name")) = "" then TheMessageNo = 3 elseif trim(Request.Form("EmailFrom")) = "" then TheMessageNo = 4 elseif instr(Request.Form("EmailFrom"),"@") = 0 then TheMessageNo = 4 elseif instr(Request.Form("EmailFrom"),".") = 0 then TheMessageNo = 4 elseif trim(Request.Form("EmailFrom")) <> trim(Request.Form("EmailFrom2")) then TheMessageNo = 4 else EmailMessage = "
This email is sent from Contact.asp on mtcf-uk.org"
EmailMessage = EmailMessage & "" & TheName & "
"
if trim(Request.Form("Address")) <> "" then
EmailMessage = EmailMessage & "" & TheAddress & "
"
end if
if trim(Request.Form("Address2")) <> "" then
EmailMessage = EmailMessage & "" & TheAddress2 & "
"
end if
if trim(Request.Form("City")) <> "" then
EmailMessage = EmailMessage & "" & TheCity & "
"
end if
if trim(Request.Form("State")) <> "" then
EmailMessage = EmailMessage & "" & TheState & " " & ThePostCode & "
"
end if
if trim(Request.Form("Country")) <> "" then
EmailMessage = EmailMessage & "" & TheCountry & "
"
end if
EmailMessage = "
" & EmailMessage & "
" & "Email address: " & TheEmailFrom & "
" if trim(Request.Form("Telephone")) <> "" then EmailMessage = EmailMessage & "Phone Number: " & TheTelephone & "
" end if if trim(Request.Form("Comment")) <> "" then EmailMessage = EmailMessage & "Comment:" & TheComment & "
" end if 'Next 23 lines commented out by Ricky 2009-05-14 to be replaced by lines following 'Dim objMail 'set objMail = Server.CreateObject("CDO.Message") 'set objConfig = Server.CreateObject("CDO.Configuration") 'Configuration: ' objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort ' objConfig.Fields(cdoSMTPServer)="smtp.1and1.com" ' objConfig.Fields(cdoSMTPServerPort)=25 ' objConfig.Fields(cdoSMTPAuthenticate)=cdoBasic ' objConfig.Fields(cdoSendUserName) = "info@mtcf-uk.org" ' objConfig.Fields(cdoSendPassword) = "mtcfukpw" 'Update configuration 'objConfig.Fields.Update 'Set objMail.Configuration = objConfig 'objMail.To = "info@mtcf-uk.org" 'objMail.From = "MTCF-uk.orgThank you for taking the time to contact Mother Teresa Children's Foundation!
Please use the form below to send us your question or comment, and we will be happy to answer you as quickly as possible. <% end if %><% if TheMessageNo = 2 then %> THANK YOU FOR YOUR EMAIL
We will get back to you as soon as possible to answer your questions. Thanks again for your interest in helping suffering and needy children all over the world.<% end if %> <% if TheMessageNo = 3 then %>
The form was not submitted. Please give your complete name.Check all the entry blanks below and submit the form when you are ready.
<% end if %> <% if TheMessageNo = 4 then %>
The form was not submitted. Please give your correct email address.
Check all the entry blanks below and submit the form when you are ready.
<% end if %> <% if TheMessageNo <> 2 then %>
<% end if %>