Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7187507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:51:41+00:00 2026-05-28T18:51:41+00:00

I have developed a .NET application with a SQL database. In SQL I have

  • 0

I have developed a .NET application with a SQL database. In SQL I have table Table_dom which contains a Date column where I will store date. Another table is Table_TL where I have one email column.

Now when the date is 5 days after the current date I need to send a reminder mail to TL from the Table_TL table email column. Could you please help on this?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:51:42+00:00Added an answer on May 28, 2026 at 6:51 pm

    If using SQL Server 2005 or later you could use the Database Mail feature to send emails directly from the database. A periodic check for sending reminders could be setup using a SQL Server Agent job.

    Edit:

    Provided you have setup the Database Mail correctly you should be able to add something like this (untested) to a SQL job:

    DECLARE @recipient AS varchar(255)   
    DECLARE users CURSOR FAST_FORWARD READ_ONLY FOR
        SELECT tl.email 
        FROM Table_TL tl 
        INNER JOIN Table_dom dom ON tl.thekey = dom.thekey
        WHERE DATEDIFF(day, dom.date, GETDATE()) > 5
    
    OPEN users
    FETCH NEXT FROM users INTO @recipient
    WHILE @@FETCH_STATUS = 0
    BEGIN
        EXEC msdb.dbo.sp_send_dbmail
            @profile_name = 'The profile you set up for the mail feature'
          , @recipients = @recipient
          , @subject = 'The subject'
          , @body = 'The message'
    
        FETCH NEXT FROM users INTO @recipient
    END
    CLOSE users 
    DEALLOCATE users 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a Windows application in .NET which uses a SQL Server database
I have an asp.net application developed. It uses LINQ to SQL to access database,
I have developed an application using VB.NET, Visual Studio 2008 and the SQL Server
We have developed a .NET web application that uses SQL Server as a backend.
I'm a little confused. We have developed an net 4.0 application. We use nhibernate
I have developed my application in .Net and my installer is working fine. Now
I have developed an ASP.NET MVC (version 2 RC) application with a ton of
i have developed a web application asp.net C#. on a button click i am
I have developed a MVC web application with ASP.NET MVC and im just wondering
I have developed a WinForm Application with VB.Net (VS2010) having Office 2010 Professional Installed,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.