0

when I try to enable email notification from advanced settings i could not find it and i search about this problem and i find some powershell script to enable it but it's not working can you give me any advice here is the powershell script

$site=Get-SPSite "http://sharepoint2013/"
$web=$site.OpenWeb()
$list=$web.Lists.TryGetList("Tasks")
if($list -ne $null)
{
   $list.EnableAssignToEmail =$true
   $list.Update()
}
4
  • Are you using Default task list template? can you add screen shot of your task list? Aug 18, 2022 at 6:34
  • Yes it's the default task , i try to create another same issue Aug 18, 2022 at 6:51
  • 1
    It seems that there is something wrong in Outgoing email configuration in your environment. Can you validate it by creating same workflow in any list where you can send any email to any person and check whether email is being sent or not Aug 18, 2022 at 7:31
  • thanks for your reponse , the Outgoing email configuration is working fine and i find the soluation but it will set all task list to send email Aug 18, 2022 at 7:46

1 Answer 1

1

Update : i find one soluation here Enable email notifications for Tasks list in SharePoint 2013 to update all task list to send email notification so if it's not a problem for you go ahead !

Add-PSSnapin Microsoft.Sharepoint.Powershell
[Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges({
$webApplicationURL = “https://Your Site.com/”
$webApp = Get-SPWebApplication $webApplicationURL

if($webApp -ne $null)
{
Write-Host “Web Application : ” + $webApp.Name

foreach($siteColl in $webApp.Sites)
{
if($siteColl -ne $null)
{
Write-Host “Site Collection : ” + $siteColl.Url
foreach($subWeb in $siteColl.AllWebs)
{
if($subWeb -ne $null)
{
#Print each Subsite
#Write-Host $subWeb.Url
Write-Host “Site: ” + $subWeb

$site=Get-SPWeb $subWeb.Url
# $web=$site.OpenWeb()
$lists=$site.Lists
if($lists -ne $null)
{

foreach ($list in $lists)
{
if ($list.BaseTemplate -like “Task*”)
{
write-host “Attempting to update: ” + $list.title
$list.EnableAssignToEmail =$true
$list.Update()
}
}
}

$subWeb.Dispose()
}
else
{
Echo $subWeb “does not exist”
}
}
$siteColl.Dispose()
}
else
{
Echo $siteColl “does not exist”
}
}
} else
{ Echo $webApplicationURL “does not exist, check the WebApplication             name”
}Remove-PsSnapin Microsoft.SharePoint.PowerShell
Echo Finish
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.