public static string GetAllGroupUsers(string GroupName)
{
string userList = string.Empty;
SPSite spSite = new SPSite(SPContext.Current.Site.ID);
using (SPWeb spWeb = spSite.RootWeb)
{
try
{
SPGroup spGroup = spWeb.SiteGroups[GroupName];
if (spGroup != null)
{
foreach (SPUser spUser in spGroup.Users)
{
userList += spUser.Email + ";";
}
}
}
catch (Exception ex)
{
}
}
return userList;
}