Enable email notifications for Tasks list in SharePoint 2013

———————–

Update: I have not tested this myself, but apparently the option now appears on the UI with April 2013 CU: http://social.technet.microsoft.com/Forums/sharepoint/en-US/8ee6bd15-6aae-43c1-a853-66ae6523adbc/assigned-to-email-alert-issue?forum=sharepointgeneral.

Update: Despite the link above, I tested this on SP1 with June 2014 CU and still could not find the option on the UI.

———————–

In SharePoint 2013 you will find that the option to enable email notification for Tasks list is no longer there. It used to be under List Settings > Advanced Settings > Send e-mail when ownership is assigned? (Yes/No). It is still there for Issues list in SharePoint 2013 however.

The good news is you can still enable it for Tasks list in SharePoint 2013, and it still works. The only thing is you’ll need to use PowerShell :). Use the script below to turn on email notification for a specific list:

Add-PSSnapin Microsoft.SharePoint.Powershell

$web = Get-SPWeb "http://myServer/myWeb"
$list = $web.Lists.TryGetList("Tasks")

$list.EnableAssignToEmail = $true
$list.Update()

Once email notification is enabled for the Tasks list, you will get the good old “The content of this item will be sent as an e-mail message to the person or group assigned to the item.” message when creating or editing an item in the list.

I’m guessing this is a MS bug. I have tested this on the March 2013 Public Update and the UI option for Tasks list is still not there.

Note: Before you run this code, make sure that you have configured outgoing mail for the web application though. The option to enable email notification for Issues list does not appear in the UI until this is configured. So it’s best to configure this before running the PowerShell code for Tasks list.

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in SharePoint 2013. Bookmark the permalink.

59 Responses to Enable email notifications for Tasks list in SharePoint 2013

  1. Trenton Mak says:

    I ran this script and the option to enable assign to email does not appear in my advanced settings. Outgoing mail is already configured as I’m getting email alerts. Any ideas?

  2. Jonathan says:

    Hi Trenton when I run the script I get this error message.
    Property ‘EnableAssignToEmail’ cannot be found on this object; make sure it exists and is settable.
    At line:1 char:1
    + $list.EnableAssignToEmail = $true
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

    Thank you in advance.

    • Jonathan says:

      Sorry I meant Bernardo.

    • Bernado says:

      Hi Jonathan, this is probably because the returning $list object is null in the previous call to $web.Lists.TryGetList(). Make sure you are passing in the correct list title. If the list is not found, null will be returned, and the EnableAssignToEmail would not be defined on null.

      • Jonathan says:

        Bernardo,
        I really appreciate all your help and time. I not very familiar with power shell, I have learned the Gui interface of sharepoint 2013, I just want to reenable this feature. Here is a link of the errors and the commands I ran on power shell.

        Again thank you so much for your help.

      • Bernado says:

        Hi Jonathan, the root cause is the access denied problem when getting the list. Ensure that the user account you are using to run the script has permission to access the SharePoint web and the list. One way to test this is to browse to the list as this particular user account.

        If you are sure that the user account has access to the list, then when launching the SharePoint Management Shell, try right-clicking on it and choose run as administrator.

      • You can also go through all the lists and test for $list.BaseTemplate -like “Task*” to apply the change to all task lists (whether it uses the template that now defaults to false or not)

  3. Jonathan says:

    Hello Bernardo,
    Again thank you for all your help and time I was able to run the script successfully without any errors. I have confirmed email is flowing correctly when I create or edit alerts or sharing sites. I am still not receiving email notification for newly created task. Please excuse my lack of knowledge using SharePoint management shell. Is there any way to confirm that this feature is now enable. Thoughts?

    Jon Pico

    • Bernado says:

      Hi Jon, when this feature is enabled on the list, browse to the list and you will the message “The content of this item will be sent as an e-mail message to the person or group assigned to the item.” displayed at the top.

      Ensure that when creating a task you have assigned the task to a user, and that user has a valid email address specified in his/her user profile. If you created this user, and then later specified the email address for him/her, sometime the email address is not updated in the site collection. To pin down the problem, try creating a new user and specify the email address, then add the user to the site collection, then assign a task to that user.

  4. Jimmie says:

    Bernado,
    How can I get this to work with SharePoint Online?

  5. Do you have a revision of the PowerShell for enabling this on Office365 / Wave15? Even with the SPO commandlets and connection, these script components don’t work with SharePoint Online (2013).

  6. Jimmie says:

    How would you convert it to C#? How do you run a feature receiver? Is this an option when you create a new project in Visual Studios?

  7. Brianna Witherspoon says:

    Hello Bernado,

    I’m working on an SharePoint site that I would love to have utilize the ability to send an email to the assigned user when the task is created. I came across your Powershell Script through endless hours of searching for a solution because I could not get a Workflow to work the way I wanted it to. Do you have instructions on how to implement the script in SharePoint? Does it have to be done through designer tool? I’m a total newbie when it comes to this stuff. Thank you for your time and help!

    • Bernado says:

      Hi Brianna,

      You will need to login to the SharePoint server, then launch SharePoint 2013 Management Shell from the Start menu as Administrator, then execute the script. No other designers tool are needed.

      Good luck.

  8. Bill Burke says:

    Bernardo, Thanks for this gem… Is it possible to activate an entire site collection? -bill

  9. Bernardo,

    Have you tried to reverse this once you have enabled it?

    I used:
    $web = Get-SPWeb “https://portal.xxxx.com/xxx/xxxx”
    $list = $web.Lists.TryGetList(“Tasks”)
    $list.EnableAssignToEmail = $false
    $list.Update()

    Everything is good until the $list.Update() , then in SP Management Shell i recieve error:
    Exception calling “Update” with “0” argument(s)

    Although this is what I was initially looking for, I have since decided to send emails through workflows. So I am attemoting to disable email notifications.

    Thanks, Bill

    • Bernado says:

      Hi Bill, I have just tested this and it works all fine for me. Suggest ensuring that the user you are using to run the script has admin access to the list, and try launching PS as admin.

      My dev farm is still on the RTM version without any CU/PU, but I doubt that it would make a difference.

      Thanks

      • Bill Burke says:

        That was it Bernado, you must have access to the content database. Once I used the correct account it worked fine. Thanks

  10. Bill Burke says:

    Reblogged this on SPS 2013 bits and commented:
    Thanks to Bernado Nguyen-Hoan for this nugget on enabling email notifications in Task Lists. It appears MS removed that feature in 2013. Luckily it’s still available, although hidden, for those who need it.

  11. Pingback: Build a testing email system in SharePoint 2013 environment - A soldier of fortune

  12. Maud Pouliot says:

    Can you plesae tell me which versions of Sharepoint is this compatible with? I specefically need to know if I can run this on Sharepoint Fondation 2013 Thanks

  13. Andrwe says:

    This will go through your whole site and fix the Task lists

    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
    });

  14. Chris says:

    I walked through the PS script and for some reason I am getting an error that states the EnableAssignToEmail is not found on this object.

    Here is what I have:

    $web =Get-SPweb “http://aaa/bbb/ccc/dd/”

    $list=$web.list.TryGetList(“Projects”)

    if($list -ne $null)

    {

    $list.EnableAss?ignToEmail =$true

    $list.Update()

    }

    Is there a way to list all of the task lists for a specific site or subside using PS?

    • Bernado says:

      Hi Chris,

      Is Projects actually a task list?

      Each list has a BaseTemplate property, which you can query to determine if the task is a task list. This property will be “Tasks” for task lists.

      Hope this helps.

  15. Kim says:

    I ran the script with no errors, but the option still didn’t appear. This may be a stupid question, but I have a 3 server farm, so would I run the script on the Web server or the App server?

    Thanks
    Kim

    • Bernado says:

      Hi Kim,

      It should not matter on which server, but run it on the Web server to be sure.

      Ensure that you have outgoing email configured for the web application.

      Hope that helps.

  16. Jojo says:

    Hi Bernardo, I have the same exact error when using $list.EnableAssignToEmail = $true

    I have used the system account/farm account and have ensured that I can login using the webapp.

    I still get the “Property ‘EnableAssignToEmail’ Cannot be found on this object; make sure it exists and is settable.”

    • Bernado says:

      Hi Joe,

      If the specified list does not exist then the code will return null, in which case you will get this error. Ensure that the list you have specified exists in the web.

      Hope that helps.

  17. Jeff Zenno says:

    Worked for me on a Custom List so that made my day! I do really like the updated tools in SP2013 but that this was left off to do via workflow or the old way just makes no sense to me, why would they do that to us, majority of the lists in my company send notice this way.

    • Jeff Zenno says:

      Seems I spoke to soon. In testing the email isn’t sending even though the disclaimer does display. I am using workflow to send emails in other lists so I’m not sure where the problem is, nothing is jumping out at me in the event logs either.

  18. Jeff Zenno says:

    No it is based on the custom list, we tested it a few ways, despite given the display saying it will do so, it doesn’t email. Oh well

    • Bernado says:

      I don’t recall there is an OOTB option to enable emails for custom lists even in SharePoint 2010. I suspect that the OOTB Task list has some special processing behind the scene to send emails, which the custom lists do not have.

  19. Jeff Zenno says:

    I’m using this now in Task Lists, works great, thank you!

  20. sanadven says:

    I have done some research on it and it appears that the option will show up if you create a list using the Task Lists (2010) feature instead of Hierarchy Tasks Lists (2013). I accidentally discover this while migrating a task list from 2010 and noticed the feature Id is different.

    The email sent out from list created by different features also added different header information as well. When opening up a email sent from the 2010 task list you will get a “Connect to Task List” in the ribbon, while the 2013 sent without these header so email open in outlook will treat it just like from any list.

    I tried adding the hidden field “Send E-mail Notification” to the 2013 Task content type and create a task out of it hoping this will trigger the option to show up but that didn’t work neither.

    • Bernado says:

      Hmm interesting finding! Thanks for reporting this :). Which version of Outlook did you use to open the email?

      • sanadven says:

        I tried both Outlook 2010 and Outlook 2013. I think there is a possibility to get this working on SP2013 but I haven’t done research on how things showing up in list settings, particularly in the how options are showing up on the advance settings. I can only assume it’s based on content type for now.

  21. Jeff Zenno says:

    Is there anyway to more granularity control which alerts fire out. Our users really hate the “has been reassigned” email. We have two compounding reasons, one they usually are reassigning it from themselves and feel they don’t need notice of the reassignment. Also we are assigning to multiple people at once, so 5 people get a notice. How we use this list this just does not matter.

  22. Bogosi Nkhumise says:

    Thanks for the script, works perfectly. And thanks to Tor Iver for the list search line.

    I’ve noticed that it will not work if the person you want to assign the task to is not already a group member with permissions on the list. So you would have to add the group permissions prior to assigning the task. Just my 2 cents and thanks again.

  23. Bhanu says:

    I am having an issue with sharepoint 2010 tracker list,we have enabled the Out of box email notification enabled and users are getting an email when any new task is assigned to the user.in addition to this, sometime user get an email for older tasks (3 years back ) in the email, although these tasks are already completed 100 % in the past. Please advise to resolve this issue.

  24. Daniel says:

    We are using Project Server 2013 and I wrote a variation of the script by Andrwe to set the email for our Issues and Risks lists.

    Add-PSSnapin Microsoft.Sharepoint.Powershell
    [Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges({
    $webApplicationURL = “http://your-site-url/”
    $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 “Risks*”)
    {
    write-host “Attempting to update: ” + $list.title
    $list.EnableAssignToEmail =$true
    $list.Update()
    }
    elseif ($list.BaseTemplate -like “Issues*”)
    {
    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
    });

  25. Sassi says:

    This is all great and thanks for the post. I have not tried yet, but have 1 easy question.
    In SP2010 the email feature sent an email everytime something in the task changed. Is that still the case if I use the powershell to re-enable?
    The Issues List in 2013 is much kinder, only sends an email to the assignee when they are assigned not when every change is made.

  26. Sassi says:

    Hi Bernado
    Many thanks for the quick reply.
    So here is the difficult question. If I enable a task list using the powershell, then save the site containinng the task list. as a site template. When I create new sites from the template will the task list already have email enabled or will I need to run the command each time I create a site?

  27. Sassi says:

    Suberb..many thanks Daniel. That will work for my solution

  28. Pingback: Setting up email system in SharePoint 2013 environment | SharePoint Interests

Leave a comment