Wednesday, April 15, 2015

How to send e-mail through PowerShell SharePoint Enivironment?

$email = "test@test.com"
$subject = "Test subject"
$body = "Test body"
$site = New-Object Microsoft.SharePoint.SPSite "http://sharepoint"
$web = $site.OpenWeb()
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,0,0,$email,$subject,$body)






No comments:

Post a Comment