<%@ 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.org " 'objMail.Cc = "" 'objMail.Bcc = "" 'objMail.Subject = "Feedback from MTCF-UK website" 'objMail.HTMLBody = EmailMessage 'objMail.Send 'Next 42 lines added by Ricky 2009-05-14 for new mail server config Dim objCDOConf Set objCDOConf = Server.CreateObject ("CDO.Configuration") ' ** SET AND UPDATE FIELDS PROPERTIES ** With objCDOConf ' ** OUT GOING SMTP SERVER ** .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpmailer.hostek.net" ' ** SMTP PORT ** .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ' ** CDO PORT ** .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' ** TIMEOUT ** .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 .Fields.Update End With Dim iMsg, u set iMsg = CreateObject("CDO.Message") 'set utf = iMsg.bodypart 'utf.charset = "unicode-1-1-utf-7" ' ** UPDATE THE CDOSYS CONFIGURATION ** Set iMsg.Configuration = objCDOConf ' apply settings to the message With iMsg .To = "info@mtcf-intl.org" ' .cc = "" ' .bcc = "" .From = "MTCF-INTL.org " .Subject = "Feedback from MTCF-INTL website" .HtmlBody = EmailMessage .Send End With ' cleanup of variables Set iMsg = Nothing end if end if %> MTCF | Contact

<% if TheMessageNo = 1 then %>

Thank 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 %>

Name <% if TheMessageNo = 3 then %>**<% end if %>
Email <% if TheMessageNo = 4 then %>**<% end if %>
re-enter Email <% if TheMessageNo = 4 then %>**<% end if %>
Address
 
City
State
Zip Code
Country
Telephone
Question or Comment:
   
<% end if %>