Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Send email to SharePoint Group

  Asked By: Anushka    Date: Apr 01    Category: Sharepoint    Views: 13001

I'm trying to email a SharePoint Group from within a
Workflow, built in Visual Studio. Simply passing the
group name into the "To" property doesn't work.

Anyone have any suggestions?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Rashawn Hopper     Answered On: Apr 01

Just an idea, maybe you can use sharepoint  Object Model to find out
the members of the sharepoint group, then add each member's email  to
the To property.

 
Answer #2    Answered By: Horace Coffey     Answered On: Apr 01

Yeah, that's the route I'm taking for now. I'm find
the SharePoint object model to be more complicated
than I anticipated.

 
Answer #3    Answered By: Rigoberto Beard     Answered On: Apr 01

The WorkflowContext has a property  named Web that references the web
containing the list that is associated with the workflow. Using the
SPWeb object, you can get group  members. Below is sample code to list
members of a group. HTH.

string url = args[0];

string groupName = args[1];

using (SPSite site = new SPSite(url))

{

using (SPWeb web = site.OpenWeb())

{

SPGroup group = web.Groups[groupName];

Console.WriteLine(String.Format("Users in group '{0}' in site
'{1}'", group.Name, url));

foreach (SPUser user in group.Users)

{

Console.WriteLine(String.Format("{0}\t{1}", user.Name,
user.Email));

}

}

}

 
Answer #4    Answered By: Tad Varvic     Answered On: Oct 15

Erm, in my honest opinion, you can just use JungleMail like I do. Besides that what you seek it has many more useful features. There is a trial which is fully functional at enovapoint.com/junglemail/sharepoint-group-email/ . I think this might sort your problem out.

 
Didn't find what you were looking for? Find more on Send email to SharePoint Group Or get search suggestion and latest updates.




Tagged: