e-mail enabled lists
-
13 Februari 2008 17:37
Is there a way to list all of the sites/lists that have been e-mail enabled along with the associated e-mail address?
If this is not the correct place to post this question would somebody please tell me where I should post it.
TIA,
Philip
Semua Balasan
-
14 Februari 2008 13:13
Hi, you will need to do this through code if you don't want to go though each site and list
For lists do the following
Code Snippetusing
(SPSite site = new SPSite("http://server")){
using (SPWeb web = site.OpenWeb()){
foreach (SPList list in web.Lists){
if (list.EmailAlias != string.Empty)
Console.WriteLine(list.Title + " uses the following email alias: " + list.EmailAlias);}
}
}
For sites I think you need to do this
Code Snippetusing (SPSite site = new SPSite("http://server"))
{
foreach (SPWeb web in site.AllWebs)
{
if (web.IsADEmailEnabled)
Console.WriteLine(web.Title + " site has the AD Email enabled");
}
}
-
14 Februari 2008 14:14
thank you