How to send email

  • hello,

    Kindly teach me on how to send an email to a certain user if there are data in a specified table.

    Let say, in a user table, there is one pending user that needs to approve. Then the sql will email the administrator to remind her that there is a pending job for him. So from time to time, if the user table still not empty. SQL will keep on reminding the administrator.

    I was looking on the DTS package sending mail task but I am lost on how I will going to check the table if its empty or not.

    I really appreciate your help. Thanks in advance. 

  • You seem to have answered your own question ?? Use xp_sendmail with a mapi mail client or find a smtp mail proc . link to the results from your query in a proc run as a job.

    You could use a trigger but I always avoid them as they degrade performance and may force deferred updates.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply