Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I understand that there are some issues when you use SharePoint group in To/CC field in "Send Email" activity in a workflow designed using SharePoint 2010.

I searched on internet for solution and I tried several things like giving read only/full permissions to the group and set "everyone" to see the group membership but that did not work.

What are my options? We do not want to go for third party products.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Finally, I was able to address this requirement as follows:

  1. Create a Custom Activity which takes sharepoint group as input parameter and outputs a set of email addresses of people added directly in the group. At the core of the activity I used following method which gives me list of email addresses for people belonging to the group

    strOutput = Microsoft.SharePoint.WorkflowActions.Helper.ResolveToEmailName(__Context, GroupName);

  2. Store the output in a variable and use it in "Send Email" out of the box activity.

UPDATE: I have added a blog post for this along with code I used: Sending Emails to SharePoint Group

share|improve this answer
    
Hi I dont have the answer, but wanted to know how to retrieve __Context in a workflow ? Thanks –  Raj Chahal Jan 12 '12 at 11:52
    
@RajChahal Take a look at my answer here for information on how to get __Context: stackoverflow.com/questions/1243736/… –  Kit Menke Jan 12 '12 at 13:40
    
I have added a blog post for this along with code. –  Ashish Patel Jan 12 '12 at 15:54
    
Cool! What is the code in the Helper class? Are you gathering the individual emails of each user in the group? Also, isn't it a .actions file (with an s)? –  Kit Menke Jan 12 '12 at 16:20
    
Helper class belongs to Microsoft.SharePoint.WorkflowActions. It has many helpful and interesting methods which we can use. –  Ashish Patel Jan 12 '12 at 16:27
show 1 more comment

Ours didn't send an email to a SharePoint Group until we:

  • Set the "Who can view the membership of the group?" to Everyone
  • Give Read permissions to the group for the site

We then tested with a very simple workflow with SPD and it worked. We got some hints from here.

If your email is still not sending after that, then you may need to see:

  • Verify it's a SharePoint group (not a Windows group)
  • Ensure the members have valid email addresses (e.g. check User Profile Import/Site User List)
  • Ask Server Admin if an email was actually sent
  • Check email isn't ending up in Junk/Outlook Rule Folders
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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