Search the Knowledgebase Browse by Category
      Home       Web Hosting       Web Hosting Guide       Sample Scripts (Windows)
   Setting up feedback form using ASP

To setup a feedback form in ASP you need to create object for the mail component installed on the server.

Commonly CDOsys mail component is installed on the server. The sample ASP code to use the same in your feedback form is as follows :

<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") =127.0.0.1
cdoConfig.fields.update

Set cdoMessage = Server.CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = "from@yourdomain.com"
cdoMessage.To = "to@yourdomain.com"
cdoMessage.Subject = "form test"
cdoMessage.HTMLBody = "Btext"
cdoMessage.Send
if Err.Number <> 0 then
SendMail = "Email send failed: " & Err.Description & "."
end if
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>


Live Support

If you have any questions at all, please don't hesitate to contact us

+91.22.28663101, 66789456

To submit Support ticket, click here


     Related FAQs
Setting up feedback form using ASP
Using AspEmail in ASP and ASP.Net
Using CDO (Collaboration Data Objects)
Connecting to MsSQL using DSN (Windows)
Connecting to MsSQL using DSN-less connection (Windows only)
File upload using Asp and Asp.Net
MsSQL Server Connection Strings - ODBC, OLE DB