In the source code, fill in the proper connection string of your database. After doing so, write the query in the source code that will generate at least a column comprising of the email addresses of the recipients. So now, the DataGrid will be having the contents of the result of the query that has been fired as well as a check box against each tuple.
The checkbox against the recipients (to whom the email is to be sent) is checked.
Also, for the email body, the desired information pertinent to a particular recipient can be included along in the mail, by enclosing the column name in the merge tags "%". The mail is written in the text box that appears below the DataGrid.
For example:
Say the DataGrid contains the following column names (as a result of your query)
1. UserName
2. MachineName
3. EmailID
4. BirthDate
The following figure shows the output window:
Figure 1.
So the email can be written as:
Dear %UserName%,
Your computer name is %MachineName%. And your birthdate is %BirthDate%.
Regards,
Team
After the 'Send' button is clicked, the emails are sent to the users (against whom the check mark appears) with the merge tags being replaced with the relevant information.

Yasin EqbalPosted Dec 16, 2019, 8:53 PM
Doesnt work
Satish WadekarPosted May 29, 2009, 5:43 AM
i wanna know more about emails sending like how many emails i can put in Too: textbox
Erik LanePosted Jul 16, 2007, 4:48 PM
Based on your title I was expecting to view code that was going to use the Mail Merge feature of MS Word....Nope. Just using RegEx to replace the tags. Those are 10 mins. that I'll never get back. Also, like Simon, I would highly recommend actually discussing your code in the article and not just screenies. Could save others time. Thanks!
SimonPosted Jul 10, 2007, 4:23 AM
I wish you would explain your code in your article