When form is submitted, you can write the following code.
Code:
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "<enter_mail.server_here>"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
Dim txtBody
With cdoMessage
Set .Configuration = cdoConfig
.From = "[email protected]"
.To = "[email protected]"
.Subject = "Sample CDO Message"
'You can add all the form fields you want..
txtBody = "Field1 : " & Request.form("Field1")
txtBody = txtBody & "Field2 : " & Request.form("Field2")
.TextBody = "This is a test for CDO.message" & txtBody
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
http://classicasp.aspfaq.com/email/h...-with-cdo.html