Send test email from SharePoint

February 12th, 2013 | Posted by Jeffrey Paarhuis in Uncategorized

With PowerShell you can send a test email from within SharePoint.

Run the following code with SharePoint Management Shell

$email = "[email protected]"
$subject = "Test subject"
$body = "Test body"

$site = New-Object Microsoft.SharePoint.SPSite "http://sharepoint"
$web = $site.OpenWeb()

// A True or False will confirm the message has been sent or not

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

6 Responses

Leave a Reply to qaz Cancel reply

%d bloggers like this: