In my previous article I explained about reading a SharePoint list using SharePoint PowerShell CSOM. In this article I will simply explain how to send an email using SharePoint PowerShell CSOM.
In order to do this, you need to have the PowerShell CSOM setup done as I have explained in my previous article.
An email can be simply sent using the SendMail method of the Utility class through the following code.
$email = [String]($email_receiver)
$emailProperties = New-Object Microsoft.SharePoint.Client.Utilities.EmailProperties
$emailProperties.To = $email
$emailProperties.Subject = $email_subject
$emailProperties.Body = $Body