Murray Brown
asked on
ASP.nter code removedet code sending automatic emails af
Hi.
I included the following code in my ASP.net project to test sending automated emails.
I debugged once then commented the code out, but emails have been sent throughout the night. How do I stop this.
I previously asked about this and accepted an answer, but the emails continued.
Does publishing the project help?
Imports System.Web.SessionState
Imports System.Timers
Public Class Global_asax
Inherits System.Web.HttpApplication
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
' 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(Addres sOf myTimer_Elapsed)
myTimer.Enabled = True
End Sub
Public Sub myTimer_Elapsed(source As Object, e As System.Timers.ElapsedEvent Args)
' use your mailer code
Dim sBody As String = "From Great Site"
Dim objScheduleMail As New clsScheduleMail()
objScheduleMail.SendSchedu leMail("in fo@online- excel.com" , "info@online-excel.com", "murbro9@yahoo.com", "", "Excel-Online enquiry", sBody)
End Sub
I included the following code in my ASP.net project to test sending automated emails.
I debugged once then commented the code out, but emails have been sent throughout the night. How do I stop this.
I previously asked about this and accepted an answer, but the emails continued.
Does publishing the project help?
Imports System.Web.SessionState
Imports System.Timers
Public Class Global_asax
Inherits System.Web.HttpApplication
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
' 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(Addres
myTimer.Enabled = True
End Sub
Public Sub myTimer_Elapsed(source As Object, e As System.Timers.ElapsedEvent
' use your mailer code
Dim sBody As String = "From Great Site"
Dim objScheduleMail As New clsScheduleMail()
objScheduleMail.SendSchedu
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER