4

I am preparing the inventory for one migration project I am working on. For this I need to get all the email enabled lists. I know it is possible using powershell get Email enabled List but unfortunately I dont have access to run power shell commands in client's environment.

Is there any way through front end / client side code to check these. ? I appreciate through front end but any help is admired.

PS: I am working on WSS 3.0 and SharePoint 2013..... TIA

2 Answers 2

1

I've done it in Javascript/JQuery with SPServices. Maybe you can use these ideas in another language. Call getAllEmails once per site collection with the site collection URL. I used this to see how many we used, since SharePoint online doesn't allow them. One of our sticking points of migrating to online.

function getAllEmails(url) {
        siteList = "<table><tr style='background-color: #78FF78'><td class='fmgTD'><b>Site</b></td><td class='fmgTD'><b>List</b></td><td class='fmgTD'><b>Email Address</b></td></tr>";
    getSiteLists(url, "Home");
    $().SPServices({
        operation: "GetWebCollection",
        webURL: url,
        async: false,
        completefunc: function(xData, status) {
            //      alert(xData.responseText);
            $(xData.responseXML).find("Web").each(function() {
                getSiteLists($(this).attr("Url"),$(this).attr("Title"));
                url = $(this).attr("Url");
                getSubSites(url);

            });
        }
    });
    siteList += "</table>";
    $('#emailSites').append(siteList);

}
function getSiteLists(weburl ,webtitle) {
    $().SPServices({
        operation: "GetListCollection",
        webURL: weburl,
        async: false,
        completefunc: function(xData, status) {
            var count = 0;
            $(xData.responseXML).find("List").each(function() {
                if($(this).attr("EmailAlias") && $(this).attr("EmailAlias").substr(0,13) != 'recordscenter'){
                    if(count == 0) {
                    siteList += "<tr><td class='fmgTD'>" + webtitle + "</td>";
                    } else {
                    siteList += "<tr><td class='fmgTD'>&nbsp;</td>";
                    }
                    count++;
                    siteList += "<td class='fmgTD'>" + $(this).attr("Title") + "</td><td class='fmgTD'><b>" +$(this).attr("EmailAlias") + "</b>@THEEMAILADDRESS</td></tr>";
                }
            }); 
        }               

    });
}
function getSubSites(weburl) {
    $().SPServices({
        operation: "GetWebCollection",
        webURL: weburl,
        async: false,
        completefunc: function(xData, status) {
            //      alert(xData.responseText);
            $(xData.responseXML).find("Web").each(function() {
                // now get all ists for this web
                getSiteLists($(this).attr("Url"),$(this).attr("Title") );
                getSubSites($(this).attr("Url"));

            });
        }
    });
}
2
  • Well this looks fine for me. $(this).attr("EmailAlias") will give me email id of a person OR a group of people? I mean what this alias refers to?
    – DvG
    Commented Jul 18, 2017 at 5:15
  • The email alias attribute is the email address - the part before the @. So if your incoming emails end in @yoursharepoint.com, for example, and you set up a list/library with an incoming email of [email protected], the EmailAlias will be 'accounting'. Mine skips over all the recordscenter email addresses that were created - at least they were when we moved to SharePoint 2013. Commented Jul 18, 2017 at 17:30
1

Email setting is not possible for all types of lists. Below are the lists where this setting is possible.

Document, picture, form library, Announcements list, Calendar list, Discussion board, Blog.

You can check this under list setting >> Communications.

3
  • Thank you for the response but my Question is completely different. It says how can check that a certain List say Library A is email enabled or not? it will be better if I get the list of all email enabled lists under a site collection!
    – DvG
    Commented Jul 17, 2017 at 11:59
  • Here LIST means any type of list; be it a Document, picture, form library, Announcements list, Calendar list, Discussion board, Blog or anything
    – DvG
    Commented Jul 17, 2017 at 12:02
  • There is no option to get all the list of email enabled list/libraries. You will have to use PowerShell and you need to get admin permissions to run that PowerShell.
    – gachCoder
    Commented Jul 17, 2017 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.