Welcome to the site. Please provide more information.
I have this code in my onStart() method:
SmtpClient smtp = new SmtpClient("smtp.xxx.com");
try
{
smtp.Send(message);
}
catch (SmtpException a)
{
System.Console.WriteLine(a);
}
But for some reason the email is only sent out when the windows service is stopped. Does the message goes to a que and only sent when stopped? How can I make this send email in time intervals? Thanks!