Exercise 1: Sending Email
The main goal of this administration UI is to provide a way to acknowledgement event registration requests. We need to send email to attendees confirming their registration. So now that we can display which users have outstanding registrations, we need to add the code to email them.
We will be using Outlook to create email, controlling it with the COM automation interop feature added in Silverlight 4. Normal Silverlight applications cannot do this. They need to run with elevated privilege, so the first thing we need to do is modify the application to request elevation.
To be clear, this does not mean administrative privileges. It simply means that Silverlight imposes fewer restrictions of its own; all the usual Windows security mechanisms will still apply.
Elevation is a choice made at installation time, so first, we need to uninstall the application so that we can reinstall it with elevation.
Outlook should start. (If you’re running on a machine for which you’ve not configured email, this might not get you very far. Outlook may start to show its installation user interface. But as long as it’s configured correctly, you should see a new email window.) The new email window’s To, Subject and body should be prepopulated.