• I have many scenarios for using SQL server to send the mails. None of mine yet have used a batching method since the recipient list is pretty small.

    1. Data integrity checks.

    I have several scripts which run daily and check data entered into the system for common errors that cannot wholly be caught by front end field checking (or are from a 3rd party source that does not have it).

    The DB job runs a set of data checks for DBs at each department and if a check comes back with results then a warning email is sent to the relevant members.

    2. Event based mails.

    Another set of jobs I have involve a complex set of queries to determine pending events requiring action which mail the relevant user if any events are flagged for them.

    3. Daily IT dashboard.

    I have a job which checks all of the active jobs on all of our database and mails us if any have failed. of course if the job checking job fails...

    Newsletter generation is something that will be bought into play later and given that no-one in the company has more than a smattering of .net knowledge the chances are that it may well be SQL server generated and that I will use some form of batching.

    Saying that though I may well have the initial query return name and salutation as well as email address and send one at a time personalising the content of each mail

    I can see though, that with the skill sets present it would be just as easy to pass a query or run an SP in via .net that returns a result set and then, if there are results, run another to retrieve recipients but for me it is far easier to do everything in the one place.

    [font="Arial"]_______________________________________________________
    Change is inevitable... Except from a vending machine.[/font]