none
Incoming email - where does it go? RRS feed

  • Question

  • Hi,

    A user wishes to add incoming email to his document library. The email address he wishes to use is "bob(at)sites.mydomain.com". However, when he tries to save the email configuration, he gets the error...

    "Unable to assign this e-mail address to the list, because the address is in use"


    My immediate reply was "use something else instead of 'bob'". He insists that this email address was created previously for him to use. Two questions spring to mind...

    1) Is it possible to determine which document library is using bob(at)sites.mydomain.com?

    2) If he previously had a document library which used this email address, and deleted the document library, would this release bob(at)sites.mydomain.com for use on other document libraries?

    Any help would be REALLY appreciated.
    Tuesday, October 6, 2009 11:12 AM

Answers

  • As far as I know, SharePointEmailWS web service does not have a method which allows you to specify a contact name and return the corresponding document library name or URL.

    I've updated the script above with two foreach loops which will iterate through every site collection in all your web applications and return the lists which have email aliases.  Usual disclaimer: make sure to test this script thoroughly in your test environment before running it in production.
    Andre Galitsky, MCTS, Lexington, KY -- My SharePoint Blog: http://www.sharepointnomad.com
    • Marked as answer by Gazz1e Thursday, October 8, 2009 2:07 PM
    Wednesday, October 7, 2009 2:14 PM

All replies

  • Hi,

    1.   It will be hard to determine ( i think) which document library is using the mail address unless you go and verify it at every  document library. Other option you have is to send a mail to the address mentioned and verify whether it is working.

    Also this will help you to verify easily which document library have the above mail saved, rather than going to the settings of every document library.

    2. Yes, It will be relased if the document library is deleted completely.




    Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS
    Tuesday, October 6, 2009 2:17 PM
  • A couple things to add:

    Depending on your incoming email settings, the original document library may have created a contact record in Active Directory.  If you delete the library, you may also want to delete the AD contact before re-using the email address in another library (and re-creating the AD contact).

    The following PowerShell script will display all lists in site collections across your web applications which have an email alias.  You can use this script to find out which document library is using bob's address.

     

    [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") | out-null 
    
    [void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 
    
    
    $oContentService = [Microsoft.Sharepoint.Administration.SPWebService]::ContentService;
    
    [Microsoft.SharePoint.Administration.SPWebApplicationCollection]$waColl = $oContentService.webApplications;
    
    $waColl1 = $waColl | where-object {$_.IsAdministrationWebApplication -eq $FALSE}
    
    
    write-host "WebApplication; Site Collection; List Title; List URL; EmailAlias"
    
    foreach ($wa in $waColl1)
    {
    
    $sites = $wa.Sites
    
    foreach ($obj in $sites)
    
    {
    
    $spSite = new-object Microsoft.SharePoint.SPSite($obj.URL) 
    
    $colWebsites = $spSite.AllWebs
    
    foreach ($web in $colWebsites)
    {
    
    	$colLists = $web.Lists
     
    	foreach ($list in $colLists)
    	{
    
    	if ( $list.EmailAlias -ne $null )
    	{
    
    	write-host  $wa.Name, ";", $obj.URL, ";", $list.Title , ";", $list.DefaultViewUrl, ";",  $list.EmailAlias
    
    	}
    
    	}
    
    }
    
    }
    
    }
    
    write-host "Finished."
    
    
    
    
    
    
    

    Andre Galitsky, MCTS, Lexington, KY -- My SharePoint Blog: http://www.sharepointnomad.com
    Tuesday, October 6, 2009 7:39 PM
  • Thanks for the help. Unfortunately, we have over 800 site collections (each with several document libraries), so running a script on each site collection could be a lengthy exercise.

    I noticed that we've got something called "SharePoint Directory Management Service" configured for incoming email. Is it possible to query this service for email to document library mappings?

    Wednesday, October 7, 2009 12:30 PM
  • As far as I know, SharePointEmailWS web service does not have a method which allows you to specify a contact name and return the corresponding document library name or URL.

    I've updated the script above with two foreach loops which will iterate through every site collection in all your web applications and return the lists which have email aliases.  Usual disclaimer: make sure to test this script thoroughly in your test environment before running it in production.
    Andre Galitsky, MCTS, Lexington, KY -- My SharePoint Blog: http://www.sharepointnomad.com
    • Marked as answer by Gazz1e Thursday, October 8, 2009 2:07 PM
    Wednesday, October 7, 2009 2:14 PM