I have a windows services that sends an email, my problem is it will only send the email when the service is terminated or onStop. What can I do to send the email every time smtp.send is called and not wait till the service is terminated?
Web Services email
Collapse
X
-
Originally posted by kenobewanWelcome to the site. Please provide more information.
SmtpClient smtp = new SmtpClient("smt p.xxx.com");
try
{
smtp.Send(messa ge);
}
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!Comment
Comment