Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

e-mail enabled lists

  Asked By: Sade Avila         Date: Mar 19, 2009      Category: Sharepoint      Views: 564
 

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.

Tagged:        

 

1 Answer Found

 
Answer #1       Answered By: Nathaniel Davis          Answered On: Mar 19, 2009       

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 Snippet


using (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 Snippet

using (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");

}

}

 
Didn't find what you were looking for? Find more on e-mail enabled lists Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].