%
if Request("formPost") = "yes" then
'firstname
'contactnumber
'fax
'email
'comments
firstname = Trim(Request("firstname"))
contactnumber = Trim(Request("contactnumber"))
fax = Trim(Request("fax"))
email = Trim(Request("email"))
comments = Trim(Request("comments"))
process_abort = "yes"
if firstname = "" then
error_msg = "Please enter your Name."
elseif email = "" then
error_msg = "Please enter your email."
elseif not checkEmail(email) then
error_msg = "Invalid email."
else
process_abort = ""
end if
if process_abort = "" then
'------------------------------------------------------
emailContent = "Dear admin," & vbCrLf & vbCrLf
emailContent = emailContent & "-------------" & vbCrLf
emailContent = emailContent & "Name = " & firstname & vbCrLf
emailContent = emailContent & "Contact No = " & contactnumber & vbCrLf
emailContent = emailContent & "Fax = " & fax & vbCrLf
emailContent = emailContent & "Email = " & email & vbCrLf
emailContent = emailContent & "Enquiry = " & comments & vbCrLf
emailContent = emailContent & "-------------" & vbCrLf
'------------------------------------------------------
Call SendMailSMTPsvg("info@aajplaw.com","AAJPLAW Contact Us Form reply",emailContent,Part1Email)
'Call SendMailCDONTS("sindy@wishbone.com.sg","AAJPLAW Contact Us Form reply",emailContent,Part1Email)
'Call SendMailCDONTS("pauller@yahoo.com","AAJPLAW Contact Us Form reply",emailContent,Part1Email)
error_msg = "Your enquiry has been submitted."
'Response.Redirect "thankyou.asp"
end if
end if
'Sub SendMailCDONTS(aTo, Subject, TextBody, aFrom)
' Const CdoBodyFormatText = 1
' Const CdoBodyFormatHTML = 0
' Const CdoMailFormatMime = 0
' Const CdoMailFormatText = 1
' Dim Message 'As New cdonts.NewMail
'Create CDO message object
' Set Message = Server.CreateObject("CDONTS.NewMail")
' With Message
'Set email adress, subject And body
' .To = aTo
' .Subject = Subject
' .Body = TextBody
'set mail And body format
' .MailFormat = CdoMailFormatText
' .BodyFormat = CdoBodyFormatText
' 'Set sender address If specified.
' If Len(aFrom) > 0 Then .From = aFrom
'Send the message
' .Send
' End With
'End Sub
''Jacker Code Added.
Sub SendMailSMTPsvg(aTo, Subject, TextBody, aFrom)
Set Mail = Server.CreateObject("SMTPsvg.Mailer")
Mail.FromName = firstname
Mail.FromAddress = email
Mail.RemoteHost = "mrelay.perfora.net"
Mail.AddRecipient " ", aTo
Mail.Subject = Subject
Mail.BodyText = TextBody
Mail.SendMail
End Sub
'-------------------
' validate functions
'-------------------
Function checkEmail(value)
Dim result, regEx
'--------------------------------------------------
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True
regEx.Pattern = "^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"
result = regEx.test(value)
Set regEx = Nothing
'--------------------------------------------------
checkEmail = result
End Function
%>
::Alain A Johns Partnership::
CONTACT US
Alain A Johns Partnership
80 Robinson Road #11-02
Singapore 0668898
Tel: (65) 63240002
Fax: (65) 63241121
E-mail: info@aajplaw.com
If you have a matter that requires attention,
please email us at info@aajplaw.com
or use the Contact Us form below. Please fill in all the fields
below. Thank you.