Solved

ASP.net scheduling

Posted on 2013-11-14
2
217 Views
Last Modified: 2013-11-16
Hi. I am trying to schedule emails in my ASP.net website and got the following code
at http://www.codeproject.com/Articles/49996/Schedule-Email-Through-ASP-NET-or-Schedule-Tasks-U
I can see where the first procedure is but am not sure where to put the second and which
control (if any) to add to the application

' Inside Global.ascx
Private Sub Application_Start(sender As Object, e As EventArgs)
      ' Code that runs on application startup
      Dim myTimer As New System.Timers.Timer()
      ' Set the Interval to 5 seconds (5000 milliseconds).
      myTimer.Interval = 5000
      myTimer.AutoReset = True
      AddHandler myTimer.Elapsed, New ElapsedEventHandler(AddressOf myTimer_Elapsed)
      myTimer.Enabled = True
End Sub

Public Sub myTimer_Elapsed(source As Object, e As System.Timers.ElapsedEventArgs)
      ' use your mailer code
      Dim objScheduleMail As New clsScheduleMail()
      objScheduleMail.SendScheduleMail()
End Sub
0
Comment
Question by:murbro
2 Comments
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 39647605
Both procedures are located inside Global.ascx.
You just need to implement your mailer class. (clsScheduleMail) in App_Code

<link removed - GaryC123>
0
 

Author Closing Comment

by:murbro
ID: 39654141
Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question