Matt

Matt

  • NA
  • 1
  • 0

Windows Service and IIS SMTP server issues

Feb 16 2007 5:44 AM
Hi guys and gals, could do with a bit of help here... I am currently writing a windows service, the basic functionality is that every 5 minutes, it will wake up, query a SQL Server 2005 database and then send an email to a preconfigured address with the email body being the query results. My problem is this: The service runs and when I debug it everything is executing fine, there are no errors popping up in the logs etc and everything seems as it should be. But!!! The emails are not being sent to the SMTP message queue until the service is stopped... This seems very strange behavious, is there a way i can flush the emails so that they are sent when they are actually created instead of when the service is stopped? thanks