The following Script helps us whether the SMTP service is Set on Our Sharepoint Site.
$site = New-Object Microsoft.SharePoint.SpSite("Your Site Name")
$web = $site.OpenWeb()
$sent = [Microsoft.Sharepoint.Utilities.SpUtility]::SendEmail
($web,0,0,”yourmail@domain.com”,”Test mail subject”,”test mail
body”)
$sent
If the SMTP settings are configured Properly in the Server then a test mail will be delivered to the given Mail ID.
$site = New-Object Microsoft.SharePoint.SpSite("Your Site Name")
$web = $site.OpenWeb()
$sent = [Microsoft.Sharepoint.Utilities.SpUtility]::SendEmail
($web,0,0,”yourmail@domain.com”,”Test mail subject”,”test mail
body”)
$sent
If the SMTP settings are configured Properly in the Server then a test mail will be delivered to the given Mail ID.
No comments:
Post a Comment