%response.buffer=true%>
<%
' Form fields
Dim strMessageType, strSubject, strSubjectOther, strComments, strName, strEmail, strTelephone, strFax, strContactRequested
' CDONTS required variables
Dim mailFrom, mailTo, mailSubject, mailBody
strMessageType = request.form("MessageType")
strSubject = request.form("Subject")
strSubjectOther = request.form("SubjectOther")
strComments = request.form("Comments")
strName = request.form("name")
strEmail = request.form("email")
strTelephone = request.form("telephone")
strFax = request.form("fax")
strContactRequested = request.form("contactrequested")
HTML = HTML & ""
HTML = HTML & "
"
HTML = HTML & ""
HTML = HTML & ""
HTML = HTML & ""
HTML = HTML & ""
HTML = HTML & " "
HTML = HTML & " Query details:
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " Contact name: "& strName &"
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " Comment type: "& strMessageType &"
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " " & strName & " wants to comment on: "& strSubject &"
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " Other details: "& strSubjectOther &"
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " Comment details: "& strComments &"
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " Contact email: "& strEmail &"
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " Contact telephone: "& strTelephone &"
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " Contact fax: "& strFax &"
| "
HTML = HTML & "
"
HTML = HTML & " "
HTML = HTML & " "& strContactRequested &"
| "
HTML = HTML & "
"
HTML = HTML & "
"
HTML = HTML & ""
HTML = HTML & ""
' Set CDONTS variables
mailFrom = "admin@alanwar.co.za"
mailTo = "samir@rynq.com"
mailSubject = "Alanwar web site query from " & strName
mailBody = HTML
' response.write mailSubject
' response.write HTML
'Use this way to send email
On Error Resume Next
Dim conf
Set conf = server.CreateObject("CDO.Configuration")
conf.Fields.Item(cdoSendUsingMethod) = 2
conf.Fields.Item(cdoSMTPServer) = "196.22.194.32"
conf.Fields.Update
'
Dim objArticleMail
Set objArticleMail = server.CreateObject("CDO.Message")
objArticleMail.Configuration = conf
objArticleMail.From = mailFrom
objArticleMail.To = mailTo
objArticleMail.HTMLBody = mailBody
objArticleMail.Subject = mailSubject
objArticleMail.Send
Set objArticleMail = Nothing
' Response.Redirect("http://www.alanwar.co.za/Main.htm")
Response.write Err.Description
Response.write "Query sent..."
%>