-2

Hi I want to send a mail every 5 mins using schedulers in c#,but I don't want to use windows service.how to send a mail every 5 minits. pleae anyone help me.

Anil Kumar
  • 263
  • 6
  • 23

2 Answers2

2

We obviously are not going to write code for you, but please have a look at this suggestion:

  • Write your Console Application that sends Emails.
  • For this have a look at the classes SmtpClient and MailMessage
  • You can also configure Log4Net with an EmailAppender to send Mails

  • Schedule a Task in "Windows Scheduler" to call the Console App every 5 minutes

KarmaEDV
  • 1,480
  • 12
  • 26
0

You can write a simple console application which get's started by the windows task scheduler every 5 minutes. This would be the simplest and most stable way.

BendEg
  • 16,106
  • 13
  • 46
  • 107