Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Send E-mail at particular Interval

Send E-mail at particular Interval

Scheduled Pinned Locked Moved Database
databasesql-serversysadmin
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sumit7034
    wrote on last edited by
    #1

    Hi I want to send Email to particular users stored in table at a regular interval like 1 hours. I will buy a mail server. I want to know is it possible to do this using sql server. If yes then what approach should I follow to implement this. Thanks in advance

    G 1 Reply Last reply
    0
    • S sumit7034

      Hi I want to send Email to particular users stored in table at a regular interval like 1 hours. I will buy a mail server. I want to know is it possible to do this using sql server. If yes then what approach should I follow to implement this. Thanks in advance

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      There are lots of approaches here is but one :- Write a .NET Service That 1. Defines a Timer for whatever interval - eg 60 minutes 2 Every interval/timer event, read the database table 3. For every row in the selected users set from the database 3a. construct the email 3b. send email using whatever protocol is applicable for your mail server 'g'

      S 1 Reply Last reply
      0
      • G Garth J Lancaster

        There are lots of approaches here is but one :- Write a .NET Service That 1. Defines a Timer for whatever interval - eg 60 minutes 2 Every interval/timer event, read the database table 3. For every row in the selected users set from the database 3a. construct the email 3b. send email using whatever protocol is applicable for your mail server 'g'

        S Offline
        S Offline
        sumit7034
        wrote on last edited by
        #3

        Thanks I was also think about this approach. but for eg. Can i host a windows service in web hosting provider like godaddy.com or mochahost.com. so where i host that windows service? If you know any provider where I can host my windows service plz tell. Thanks

        G 1 Reply Last reply
        0
        • S sumit7034

          Thanks I was also think about this approach. but for eg. Can i host a windows service in web hosting provider like godaddy.com or mochahost.com. so where i host that windows service? If you know any provider where I can host my windows service plz tell. Thanks

          G Offline
          G Offline
          Garth J Lancaster
          wrote on last edited by
          #4

          no - by 'service' I meant it would run as a win32 service on a windows server type machine - not in/on a web server 'g'

          S 1 Reply Last reply
          0
          • G Garth J Lancaster

            no - by 'service' I meant it would run as a win32 service on a windows server type machine - not in/on a web server 'g'

            S Offline
            S Offline
            sumit7034
            wrote on last edited by
            #5

            Is there any other alternative for this? like using sql server to send mail at particular interval.

            M 1 Reply Last reply
            0
            • S sumit7034

              Is there any other alternative for this? like using sql server to send mail at particular interval.

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              You could set up a SQL Server job to send the mail from a stored procedure.

              Never underestimate the power of human stupidity RAH

              S 1 Reply Last reply
              0
              • M Mycroft Holmes

                You could set up a SQL Server job to send the mail from a stored procedure.

                Never underestimate the power of human stupidity RAH

                S Offline
                S Offline
                sumit7034
                wrote on last edited by
                #7

                Thanks after setting up sqlserver job am I able to send mail to all the users stored in my table? Is there option that this process repeat itself after every hour like a timer?

                M 1 Reply Last reply
                0
                • S sumit7034

                  Thanks after setting up sqlserver job am I able to send mail to all the users stored in my table? Is there option that this process repeat itself after every hour like a timer?

                  M Offline
                  M Offline
                  Mycroft Holmes
                  wrote on last edited by
                  #8

                  Yes SQL server has a scheduler which will repeat the job as often as you like.

                  Never underestimate the power of human stupidity RAH

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups