<%
'----------------------------------------------------------------------------
'
' Send email using the CDOSYS component
'
' by Chris Hardy
' http://www.chrishardy.co.uk/
'
'----------------------------------------------------------------------------
Dim ContactName As Object, ContactEmail As Object, ContactMessage As Object
dim oCdoMail, oCdoConf, sConfURL
If Request.Form("Action") <> "" Then
ContactName = Request.Form("Name")
ContactEmail = Request.Form("Email")
ContactMessage = Request.Form("Message")
oCdoMail = Server.CreateObject("CDO.Message")
oCdoConf = Server.CreateObject("CDO.Configuration")
sConfURL = "http://schemas.microsoft.com/cdo/configuration/"
With oCdoConf
.Fields.Item(sConfURL & "sendusing") = 2
.Fields.Item(sConfURL & "smtpserver") = "66.76.169.186"
.Fields.Item(sConfURL & "smtpserverport") = 25
.Fields.Item(sConfURL & "smtpusessl") = False
.Fields.Item(sConfURL & "smtpauthenticate") = 1 'basic (clear-text) authentication
.Fields.Item(sConfURL & "sendusername") = "rdotson@billswoodworks.com"
.Fields.Item(sConfURL & "sendpassword") = "Dot$on13"
.Fields.Update()
End With
With oCdoMail
.From = "helpdesk@jacksoncountybash.com"
.To = "helpdesk@jacksoncountybash.com"
.Subject = "Contact Us from JacksonCountyBash.com"
.TextBody = "Name: " & ContactName & " Email: " & ContactEmail & " Message: " & ContactMessage
.HTMLBody = "Name: " & ContactMessage
.Configuration = oCdoConf
.Send()
End With
oCdoConf = Nothing
oCdoMail = Nothing
Response.Write("Thanks for your message!")
Else
%>
<%
end if
%>