Style cleanup, bugfixes

Credentials containing @domain.com problems in PowerShell 2.0 fixed.
Added calls to MailMessage.Dispose(), so it doesn't leave handles open
to attachment files.