Click to See Complete Forum and Search --> : Sending email alert from a Service


_msd_
November 28th, 2004, 11:36 PM
Hi guys,

I'm not really sure if this subject really falls on this forum. But anyway, here it is...

I'm trying to develop a service program. Let's call that MainSvc. In turn, I am also creating another service program to 'monitor' MainSvc, call it MainSvcMon.

The function of MainSvcMon service is simple. It monitors/pings MainSvc service every so often (can be configured as service param in seconds). If MainSvcMon detects that something is 'wrong' (hung, etc) with MainSvcMon, I want MainSvcMon to be able to send an alert message to say myself through email or maybe text message to my mobile/cell phone.

As a start, I would like to begin with the sending email implementation (later, I will also explore the text message option). How can I do this? I mean I am new to this subject. Any sample code, or url's you can point me would be much appreciated.

Additional Info: Company email system is Lotus Notes but will soon be moving to Exchange 2003 - MS Outlook. So, I should not be constraint with the mail server softare/library.

By the way, my services will be written using MS VC++ 6.0 and will be installed on Win2000 Servers.

Thanks,
_msd_