SPList resourceList = SiteProvisioningProvider.GetListReference(web, "Lists/Resources");
foreach (SPFieldUserValue admin in adminCollection)
{
SPListItem resourceItem = resourceList.Items.Add();
string name = admin.User.Name;
resourceItem["FirstName"] = name.Split(' ')[0].ToString();
resourceItem["Email"] = admin.User.Email;//null
resourceItem.Update();
web.SiteGroups["Engagement Administrator"].AddUser(admin.User);
}
resourceList.Update();
Above code is returning email and name of the user infomation. The same methos is called when i click some button in sharepoint site and also timer job calling the same method. But nly in the timer job i am not getting any email id for any user in any domain. This is happening is production environment not with QA/DEV. What will be the issue?
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
|
|||||
|
|
you can find sharepoint all user from hidden list named "User Information List". and its url like this "siturl/_catalogs/users/simple.aspx". using this list you can fetch all email id of sharepoint users.
you can also see this link might be helpful for you: http://zimmergren.net/technical/sharepoints-hidden-user-list-user-information-list |
|||
|
|
|
Hi please check this ans. |
|||
|