Send Email with PowerShell

The following script allows to send an email in HTML using SMTP with PowerShell.

The script does not prompt for credentials (the user account and its according password are set into the script itself). To avoid writing user account and password in the script, Get-Credentials can be used to prompt the user for username and password.