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
  "Just emailing to let you know that it's all working now - many many many many thanks!"
Cain
 
   More Testimonies

Advanced Mail Merge Example

Back to index.

The following example builds off of the intermediate mail merge example. Besides just replacing the 'To', and 'Subject' fields with database fields, you can also replace text in the body of your email, using the mail merge method. This time we will be sending out a fictious reciept for an invoice. In our database, we are also storing the amount of the invoice, and the date it placed. We will add that field to the body of the email. Again, to add a database field to an email, you need to surround the the field name with '##'. The mail merge method also keeps track of all the successful emails that were sent off. So you can keep a record of what emails were sent.

See the example below.

Email Server
From Email Address
To Email Address
Email Subject
Email Body Contents
Track Successful Emails?
 
The box is not shipped.
aspNetEmail is a    
downloadable product.
 


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 what the database looks like below.

 

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