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. Sending email automatically?

Sending email automatically?

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netlearning
4 Posts 2 Posters 5 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.
  • M Offline
    M Offline
    mythinky
    wrote on last edited by
    #1

    How can I send email every day automatically in ASP.Net website? Your idea will be appreciated. Thanks a bunch... Learning .NET

    M 1 Reply Last reply
    0
    • M mythinky

      How can I send email every day automatically in ASP.Net website? Your idea will be appreciated. Thanks a bunch... Learning .NET

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

      Hi there. You may want to describe in a little more detail what you want to accomplish. If you're looking to have a nightly (daily?) email sent, you wouldn't need to do it from within ASP.NET. You could just use the Windows Scheduler (or at command from a command line) to schedule a recurring task, having it send an email. You can look here[^] for a command-line emailer written in .NET if it is useful. I use it for exactly what you have described so far - sending daily emails following the execution of batch jobs.

      M 1 Reply Last reply
      0
      • M Mike Ellison

        Hi there. You may want to describe in a little more detail what you want to accomplish. If you're looking to have a nightly (daily?) email sent, you wouldn't need to do it from within ASP.NET. You could just use the Windows Scheduler (or at command from a command line) to schedule a recurring task, having it send an email. You can look here[^] for a command-line emailer written in .NET if it is useful. I use it for exactly what you have described so far - sending daily emails following the execution of batch jobs.

        M Offline
        M Offline
        mythinky
        wrote on last edited by
        #3

        Thanks for your reply. Yeah, here i describe it. I build an school library application for my final project. What i want to accomplish is sending an email to some email addresses that haven't returned their book according to due date.Thus it need to check the overdue loan everyday, then send them an email automatically. Problem is the school doesn't allow me to touch the server things, then i can't schedule using the windows scheduler. is it possible i use the windows scheduler to accomplish the email thing according to my case? If could, how? If possible, i want to search for a .Net service that can schedule a task, in this case sending an automate email.

        M 1 Reply Last reply
        0
        • M mythinky

          Thanks for your reply. Yeah, here i describe it. I build an school library application for my final project. What i want to accomplish is sending an email to some email addresses that haven't returned their book according to due date.Thus it need to check the overdue loan everyday, then send them an email automatically. Problem is the school doesn't allow me to touch the server things, then i can't schedule using the windows scheduler. is it possible i use the windows scheduler to accomplish the email thing according to my case? If could, how? If possible, i want to search for a .Net service that can schedule a task, in this case sending an automate email.

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

          Hi there. I can see what you mean - these things can be tough when you don't have access to the server. Unfortunately, you really are looking for a service of some kind for scheduling which implies the server. Maybe you could set up a workstation and use the Windows Scheduler on it to execute a task (.NET command-line application?) that would query for the appropriate email addresses (I'm assuming they are in a database? do you have access to query it?) and send emails. Assuming you have access to query for the email addresses, and access to send mails through an SMTP server, this wouldn't be too difficult an app to write. I've sent you a link to an article which shows an example of using the System.Web.Mail objects for sending mail. There are lots of examples around that show how to connect to and query a database... you could get your email addresses in a DataSet object, then loop through the rows, constructing and sending a MailMessage for each... package it up as a console application running on a workstation - again, as long as the privileges exist for that workstation to connect to the server, query, and send SMTP mail, you could make it work using the workstation's Scheduler service.

          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