How to send mail after a fixed time period (timer function) RRS feed

  • Question

  • User1052662409 posted

    Hi all,

            Actually I want to send mail,on a fixed time interval.

           Suppose on 1st date of every month a mail should goes automatically to someone.

           Can you please help me out.


    Friday, December 11, 2009 11:46 PM


All replies

  • User826222609 posted

    There is two solutions for that

    1) Create windows service in that service check the time and date if found your setting time and date then send your required email

    2) Create SSIS Package

          => In package create email sending package

          => Deploye this package in sql server -> SQL Server Agent

          => Schedule this package for specific time

          When the specific time is accure then SSIS Package is execute and SSIS Package is send the email

          for SSIS Package refere the link




    if suitable answer then click on Answer

    Saturday, December 12, 2009 1:18 AM
  • User1414178881 posted

    Create a windows service that checks regularly(i.e.once a month or depending on that fixed time interval ),and send emails automatically.

    Personally,I use that approach since I develop websites/webapplications for newsletter,SMS,..etc and may use SQLServer or Oracle.SSIS is for SQLServer,if you used oracle or any other DB then you have to use windows service.

    Saturday, December 12, 2009 2:16 AM
  • User1052662409 posted

    But I am sending mail through my C# code...

    how to define conditions, for timer function (this is a webapplication on a local server).

    If you need any other information about this web application, so please ask me.


    Saturday, December 12, 2009 5:30 AM
  • User1414178881 posted

    In general:

    1)Create a table for the emails that should be sent in regular dates depending on your bussiness,columns could be:

    i.e id ,from,to,subject,body,interval/date to send......etc

    2)Create a windows service that reads regularly from that table,and sends the email(s)

    In your web application,all you have to do is to insert a record into that table in DB and that's it.

    This is the general idea,so to get you started with it take alook at these links:





    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 12, 2009 6:04 AM
  • User-952121411 posted

    I prefer to use a Windows Service to accomplish this task.  Read the following link for details on how to implement a solution to your problem:

    Running a Periodic Process in .NET using a Windows Service: 


    Hope this helps! Smile

    Monday, December 14, 2009 9:24 AM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 15, 2009 10:05 PM
  • User-1067358373 posted

    If you different email tasks to send out at different intervals, take a look at this post.


    Thursday, December 24, 2009 12:25 PM