Been looking for something like this in a while to test newly setup or existing SMTP setups for simple server notification or business applications e.g. SharePoint, as it saves you having to install telnet or putty in order to send a quick test email to make sure its not getting blocked somewhere i.e. spam: ## Update ## Just found out there’s an actual powershell Cmdlet for this: Send-MailMessage!
$msg = new-object Net.Mail.MailMessage
#Creating SMTP server object
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = "fromID@xxxx.com"
$msg.subject = "My Subject"
$msg.body = "This is the email Body."
Thanks to SharePoint and Others for the basics!