Ejemplo n.º 1
0
        public void ServiceTimer_Tick(object sender, System.Timers.ElapsedEventArgs e)
        {
            string Msg = "Hi ! This is DailyMailSchedulerService mail.";//whatever msg u want to send write here.

            SendMailService.SendEmail("*****@*****.**", "Subject", Msg);

            if (getCallType == 1)
            {
                timer1.Stop();
                System.Threading.Thread.Sleep(1000000);
                SetTimer();
            }
        }
Ejemplo n.º 2
0
 protected override void OnStop()
 {
     timer1.AutoReset = false;
     timer1.Enabled   = false;
     SendMailService.WriteErrorLog("Service stopped");
 }
Ejemplo n.º 3
0
 protected override void OnStart(string[] args)
 {
     timer1.AutoReset = true;
     timer1.Enabled   = true;
     SendMailService.WriteErrorLog("Service started");
 }