Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

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(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 sBody As String = "From Great Site"
        Dim objScheduleMail As New clsScheduleMail()
        objScheduleMail.SendScheduleMail("info@online-excel.com", "info@online-excel.com", "murbro9@yahoo.com", "", "Excel-Online enquiry", sBody)
    End Sub
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much