Although putting an entry in the Application log may suffice, you might be required at times to also send a notification when a problem is found and a process has been terminated. In this last section we will implement the code necessary to send an e-mail alert when a process is terminated.
Example 8-16 represents the changes required to our configuration file so that the code will send an administrative alert.
Example 8-16. E-mail configuration elements.
<SmtpServer>smtpserver</SmtpServer> <Subject>Test Subject</Subject> <Message>Found Message</Message> <Sender>Michael.E.Gernaey@test.com</Sender> <Recipient>Michael.E.Gernaey@test.com</Recipient> <SmtpPort>25</SmtpPort> <MailEnabled>true</MailEnabled> ...