mail for ASP.NET email smtp mail for ASP.NET email smtp
mail for ASP.NET email smtp

Other Products
mail for ASP.NET email smtp
  "I have to tell you I am super impressed with your support. Thanks "
B. Davis
 
   More Testimonies

Simple MailMerge Example

Back to index.

The following example will use a datatable and perform a mail merge. If you have a datatable, datareader, or dataset of email addresses, aspNetEmail can use them as a datasource and perform a mass mailing for you. Typically you will want to do something like this from a Console application or a windows application so you do not have to worry about server script timeouts. This example only sends out a small amount of emails. The datasource is an access database called MailMerge. The database only contains 1 table called 'tblMembers'. You can see a listing of the table below..

As an example, this page will take the data you fill out below and merge it with the information found in the dataset. To match a property of aspNetEmail with a datasource field, surround the name of the field in '##' symbols. In this example, we will set the 'TO' field of the email to ##fldEmail##. fldEmail happens to be the name of the field in the database that contains all of our email addresses. As aspNetEmail sends emails, it will replace ##fldEmail## with the actual value found in the database. See the example below for more information.

Email Server
From Email Address
To Email Address
Email Subject
Email Body Contents
 
The box is not shipped.
aspNetEmail is a    
downloadable product.
 
aspNetEmail
Voted Number 1 ASP.NET Email Control
Voted Best Email Control


aspNetEmail
Runner Up ASP.NET Email Control
Voted Runner Up Email Control


aspNetEmail
Voted Number 1 ASP.NET Email Control
Voted Best Email Control


aspNetEmail
Voted Number 1 ASP.NET Email Control
Voted Best Email Control


aspNetEmail
Voted Number 1 ASP.NET Email Control
Voted Best Email Control


aspNetTraceRoute
Voted Runner Up Networking Control
Runner Up - Networking Control

 

For your reference, here is the data found in the database.

 

fldEmailfldFirstNamefldLastNamefldDatePurchasedfldAmount
user1@aspnetemail.comBobJones3/13/2002 12:00:00 AM10
user2@aspnetemail.comSteveCantoo3/14/2002 12:00:00 AM20.25
user3@aspnetemail.comJoanDew3/12/2002 12:00:00 AM18.15