Showing posts with label Email in Sharepoint. Show all posts
Showing posts with label Email in Sharepoint. Show all posts

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)