Sending an email after a condition is met in SQL server

  • Thread starter Thread starter Simon Harvey
  • Start date Start date
S

Simon Harvey

Hi chaps,

My company runs a website that allows users to sign up to a seven day trial
of a software product. What we would like to happen is, about three or four
days after the trial expires a message to be sent to the user encouraging
him to signup to the paid service.

My question is, what would be the best way to detect which users need an
email sent to them and how would I send the email itself. I'm thinking that
I might have to use a trigger to do this somehow? Also, should it be the
case that SQL Server sends the email, or do I have to get SQL server to
trigger an email being sent by some other application? If thats the case,
how do I get SQL Server to trigger the action in the other application.

The site itself is written in ASP.net

Thanks everyone

Simon
 
Set up a job that checks the trial user table (whatever you call it) for
users that have not been contacted and are X days or more past the date. You
can then set up the job to send mail through SQL Mail and flag the user as
having the email sent.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Thanks G. Thats pretty much the conclusion I came up with as well.

Thanks for your help

Simon
 
Back
Top