|
Contact Us
|
|
|
|
|
<%
If Request.Form.Count>0 Then
Dim x, strMsg, objMail
'On error resume next
if Request.form.count = 0 then
response.redirect "/"
end if
strMsg=""
For Each x In Request.Form
strMsg = strMsg & "| " & x & " : | " & Replace(Request.Form(x),vbcrlf," ") & " | " & vbCrLf
Next
strMsg = strMsg & "| Referer : | " & Request.ServerVariables("HTTP_REFERER") & " | " & vbCrLf
strMsg = strMsg & "| Original Referer : | " & Session("source") & " | | " & vbCrLf
Set objMail= Server.CreateObject("CDO.Message")
With objMail
If Instr(Request.Form("Reply_Email"),"@") > 0 Then .From = Request.Form("Reply_Email")
.To = "webmaster@saurabh.info"
.Subject = Request.Form("Subject")
.HTMLBody = strMsg
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="localhost"
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =25
.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Configuration.Fields.Update
Set Flds = .Fields
With Flds
' add a custom header here
.Item("urn:schemas:mailheader:X-Originating-IP")= Request.ServerVariables("REMOTE_ADDR")
.Update
.Resync
End With
.Send
End With
Set objMail = Nothing
Response.write "Your information has been submitted. Thank you!"
End If
%>
|
|
|