Project Description
Mails events from Windows' system Event Log which matches rules in configuration.

Runs as Windows service and has super simple configuration

Rules confiugration

<?xml version="1.0" encoding="utf-16"?>
<MailerConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <MonitoredEventLogs>
    <string>Application</string>
  </MonitoredEventLogs>
  <Rules>
    <MailRule>
      <SourceNameRegex>Terminal Services.*</SourceNameRegex>
      <Recipient>miroslaw.jedynak@yourmail.com</Recipient>
      <EntryTypes>Error,Warning</EntryTypes>
    </MailRule>
  </Rules>
  <SendingPause>60</SendingPause>
</MailerConfiguration>

Smtp configuration

(for example gmail)
<system.net>
  <mailSettings>
    <smtp from="youraccount@gmail.com">
      <network host="smtp.gmail.com" port="587" userName="youraccount@gmail.com" 
        password="yourpassword" defaultCredentials="true" />
    </smtp>
  </mailSettings>
</system.net> 

Install as Windows Service

From command line:
c:\>EventLogMailer.exe install
c:\>EventLogMailer.exe uninstall

Last edited Sep 5, 2013 at 9:58 AM by piotrdela, version 13