Question Send different, personalized Outlook emails for records in table based on conditions

dholzman

New member
Joined
Oct 21, 2010
Messages
1
Programming Experience
Beginner
Before I explain my questions I would like to state a few things. I have zero programming background. I have learned how to work with SQL and VB.Net only by reading forums such as this one and articles. I have only been working with SQL and VB.Net for less than a month. I preface my question so that the answers do not go beyond my comprehension.

In addition, I have spent many hours searching forums for assistance on doing exactly what I need, but I have found it difficult to find because I do not know the correct method to use (views vs. stored procedures vs. ....)

Background on my application:
I am building an application that stores information about contacts. Such as standard contact information, notes about them, etc. This part is easy and I have already accomplished this. The primary function of the application is to send automatically generated emails to contacts in the database based on a large number of criteria. Each contact has a status. This status changes depending on what the contact has done AND what emails have been sent out. For instance, if the contact has just been put into the system, their status will say "Inquired". If the contact has received multiple follow up emails, the status will say "Second Follow Up email Sent", or something like that. Each contact works his way through a process that I (the user) monitors using this application. The Status is a computed column based on a function.

The Question:
I need to figure out how to have the application look through each record in my primary contact table (singular table, but it does have a computed column "Status") and then do two things:

1. Send a specific email to that record's email address (and put the contact name in the email) based on other field values (or NULL) for that record, including that computed column of "Status".
2. Update a particular field for that record with a time stamp (GetDate()), which will result in the "Status" being changed (this status change part I have coded already).

*I would like this to be done automatically, but if the user has to press a button to run the code each time, that is fine too.

I appreciate any help that can be provided to me in my endeavor. While actually have concise code examples would be optimum, even providing advice as to how I should go about doing what I am wanting (such as telling me to use stored procedures or views, etc.) would be beneficial as well.

If you need any more clarity regarding my app or my question, just ask. Also, I am using Visual Studio Express 2010 and the SQL Express that it came with.

Thanks,
David
 
Top Bottom