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
  1. Home
  2. Web Development
  3. ASP.NET
  4. receiving email in ASP.NET - how do I schedule checking?

receiving email in ASP.NET - how do I schedule checking?

Scheduled Pinned Locked Moved ASP.NET
helpquestioncsharpasp-netdatabase
4 Posts 2 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.
  • W Offline
    W Offline
    Warren Stevens
    wrote on last edited by
    #1

    I'm new to ASP.NET so any help pointing me in the right direction would be great! I've figured out how to send and receive email (sending using the built-in .NET classes, and receiving using the AdvancedIntellect aspNetPOP3 component, since I couldn't see any built-in classes for this). My problem is I don't know how to make the website check for the email on regular basis. Essentially what I want to do is have the website check the email (POP) server (every 30 seconds or so?) check the subject (etc) of the email, and then send a response email with some appropriate data from my database. Should I setup a timer? Is this "not recommended" for an asp.net application, and should be done some other way? Thanks Warren


    Need Icons? Huge list of Stock Icon collections (free and commercial): www.IconsReview.com

    M 1 Reply Last reply
    0
    • W Warren Stevens

      I'm new to ASP.NET so any help pointing me in the right direction would be great! I've figured out how to send and receive email (sending using the built-in .NET classes, and receiving using the AdvancedIntellect aspNetPOP3 component, since I couldn't see any built-in classes for this). My problem is I don't know how to make the website check for the email on regular basis. Essentially what I want to do is have the website check the email (POP) server (every 30 seconds or so?) check the subject (etc) of the email, and then send a response email with some appropriate data from my database. Should I setup a timer? Is this "not recommended" for an asp.net application, and should be done some other way? Thanks Warren


      Need Icons? Huge list of Stock Icon collections (free and commercial): www.IconsReview.com

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Well, depending on the circumstances, you might just want a console application or windows service running on the server to periodically check your POP mail.

      W 1 Reply Last reply
      0
      • M Mike Ellison

        Well, depending on the circumstances, you might just want a console application or windows service running on the server to periodically check your POP mail.

        W Offline
        W Offline
        Warren Stevens
        wrote on last edited by
        #3

        Mike Ellison wrote:

        a console application or windows service running on the server

        That's what I was thinking of as an alternative, but I didn't know if those (i.e. a Windows service) are typically available in a hosted environment??? Do you know if that is typically the case? Having previously been responsible for keeping a server going, I really want to use a hosted environment where someone else keeps the thing patched (etc).


        Need Icons? Huge list of Stock Icon collections (free and commercial): www.IconsReview.com

        M 1 Reply Last reply
        0
        • W Warren Stevens

          Mike Ellison wrote:

          a console application or windows service running on the server

          That's what I was thinking of as an alternative, but I didn't know if those (i.e. a Windows service) are typically available in a hosted environment??? Do you know if that is typically the case? Having previously been responsible for keeping a server going, I really want to use a hosted environment where someone else keeps the thing patched (etc).


          Need Icons? Huge list of Stock Icon collections (free and commercial): www.IconsReview.com

          M Offline
          M Offline
          Mike Ellison
          wrote on last edited by
          #4

          It would be worth discussing it with your host; your host may very well provide some kind of scheduled task service themselves. There are approaches to use though if your requirement has to be within the context of ASP.NET code. You could start a new thread in the Application.Start event to poll for your emails. This article shows an example of that approach: http://www.angrycoder.com/article.aspx?cid=5&y=2003&m=4&d=11[^]. As the article author points out, there are some pitfalls to this approach, but you can decide if it will work for your setup.

          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