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
[Microsoft.SharePoint.Client.Utilities.Utility]::SendEmail($Context,$emailProperties)
Used variables along with the description are as follows.
- $email_receiver - Received email address. This needs to be an email of a user within the organization as we are using the SendEmail method.
- $email_subject - Subject of the email.
- $Body - Body of the email.
- $email - This needs to be an array contains at least one element.
This comment has been removed by the author.
ReplyDeleteMuch obliged, that was a truly cool read! hotmail com login
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteSo, if they like your products or services then maybe they contact you or they share their email to you. You should start playing around LinkedIn.Email List for Marketing
ReplyDeleteYou delivered such an impressive piece to read, giving every subject enlightenment for us to gain information. Thanks for sharing such information with us due to which my several concepts have been cleared. sign in to Hotmail
ReplyDeleteThanks for the valuable information and insights you have so provided here... ActiveCampaign Cons
ReplyDeleteThank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. www.hotmail.com
ReplyDeleteThanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.
ReplyDeleteemail lookup
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.. ceo email
ReplyDeleteBest work you have done, this online website is cool with great facts and looks. I have stopped at this blog after viewing the excellent content. I will be back for more qualitative work. Login Tips
ReplyDeleteWow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks Learn how to enter your email
ReplyDeleteSuperior post, keep up with this exceptional work. It's nice to know that this topic is being also covered on this web site so cheers for taking the time to discuss this! Thanks again and again! acesse a caixa de entrada do Hotmail entrar
ReplyDeleteI’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... hotmail entrar
ReplyDeleteWow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks best email marketing services
ReplyDeleteIt is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait reading. I am impressed with your work and skill. Thanks. how to send bulk mails through gmail
ReplyDeleteWelcome to the party of my life here you will learn everything about me. LinkedIn Data Extractor Software Tool
ReplyDelete