Incoming email settings in sharepoint 2013

2018-04-20 09:48:35

We have email id for which incoming email is configured for a document library in site collection. We have 2000 sharepoint sites. How to check which document library is configured with particular email ID for incoming email ?

Thanks for your help in advance

You can use the PowerShell command below to loop the web application and use CanReceieveEmail and EmailAlias parameter to check the email alias.

$SPwebApp = Get-SPWebApplication "http://sp"

foreach ($SPsite in $SPwebApp.Sites)

{

foreach($SPweb in $SPsite.AllWebs)

{

foreach ($SPList in $SPweb.Lists)

{

if ( ($splist.CanReceiveEmail) -and ($SPlist.EmailAlias -eq "emailname") )

{

WRITE-HOST "E-Mail: " $SPList.EmailAlias "@contoso.com , List: " $SPlist.Title ", Web: " $SPweb.Url

}

}

}

}

  • You can use the PowerShell command below to loop the web application and use CanReceieveEmail and EmailAlias parameter to check the email alias.

    $SPwebApp = Get-SPWebApplication "http://sp"

    foreach ($SPsite in $SPwebApp.Sites)

    {

    foreach($SPweb in $SPsite.AllWebs)

    {

    foreach ($SPList in $SPweb.Lists)

    {

    if ( ($splist.CanReceiveEmail) -and ($SPlist.EmailAlias -eq "emailname") )

    {

    WRITE-HOST "E-Mail: " $SPList.EmailAlias "@contoso.com , List: " $SPlist.Title ", Web: " $SPweb.Url

    }

    }

    }

    }

    2018-04-20 10:24:50