Search HouseOfScripts.com

 

All Scripts        JavaScripts        ASP Scripts        Other Scripts

 

  Cusomize and send dynamic email using CDONTS asp, send, email, cdonts, link, recordset, hyper, hyperlink, create, list, box, dependant, dynamic

I spent long time searching on the Internet trying to figure out how to send email using CDONTS. I was able to find different peaces of information on different Web Sites. I want to summarize everything that I found.

This page shows how to customize and send dynamic email. If you want to see how to send simple mail as soon as page loads click here. To see CDONTS tips and tricks how to customize email click here. To see how to send email to multiple users that have to be picked up from the RecordSet click here.

First question usually is how to send email when submit button clicked. This can be done by placing:

<%
if (cStr(Request("Submit")) <> "") Then
..... You email code goes here
.... You email code goes here
.... You email code goes here

End If
%>


If you need to redirect to another page, use:

<%
if (cStr(Request("Submit")) <> "") Then
..... You email code goes here
.... You email code goes here
.... You email code goes here

Response.Redirect("../index.html")
End If
%>


Now, what if we need to create a page to send a feedback or comments? We have to be able to pick up text from the Textfield in the form or from the RecordSet. This it how to do this:

From:
Code:
Explain:
Textfield in the form:
Request.Form("name")
Where name is the name of the textfield with information.
RecordSet
RecordSet1("email")
RecordSet1 is the name of the RecordSet and email is the field in the RecordSet.

 

To see CDONTS tips and tricks how to customize email click here.

 

 


Home       Scripts       Active WebTools       Web Templates       Forum       Tools        Hosting       Questions/Comments       Add/Request