Wednesday, March 1, 2017

Test Out Going Email from SharePoint

sd = new-object System.collections.specialized.stringdictionary
$sd.add("to","me@website.anyextention")
$sd.add("from","SharePointCodi@SP.anyextention")
$sd.add("Subject","Sent from Outbound Server")



$web = get-spweb "https://mySharePoint"
$body = "This is our body<br/> OutBound <strong>HTML</strong> mySharePoint."


With the body prepared, we just need to call the:

SPUtility.SendEmail method to send our message.
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,$sd,$body)

No comments:

Post a Comment