Use PowerShell to Send email from O365 Account

Prior to PowerShell 5.0 to send an email you had to use the .NET System.Net.Mail namespace. Now with PowerShell 5.0 and higher you can easily send email messages using the cmdlet Send-MailMessage. . You can use any valid SMTP server but for our example we’ll use an O365 account. Just make sure you set your…