Posts Tagged 'incoming email'

SharePoint 2010 Incoming Email problem – email messages will go through, but attachments will not

This problem took awhile to figure out, so I figured it might be helpful to post it.

Setting up incoming email for SharePoint 2010 Enterprise, as instructed by TechNet: http://technet.microsoft.com/en-us/library/cc262947.aspx. Configured SMTP service, set up the Exchange connector, and configured incoming email settings in SharePoint 2010 Central Administration. Created a test document library, configured it with an email alias, and tried sending a test email. Test email went through, so we’re looking good.

Next, sending an email message with an attachment (the library is configured to save both the email message and the attachment). The email message arrives without any issues, and the attachment shows up as well.

Next, another user is going to send a test message with an attachment to the same library. His email message goes through, but no attachment! What’s going on?

In Notepad I opened the message that I sent with an attachment (which worked) and compared it to the message that did not work.

In the attachment section, we’re finding the following:

My email attachment – Works in SharePoint

–_004_07A87DF66A2E0E439EC9B780BDA9C64001AD9B8628USSFA1E1404gl_
Content-Type: text/plain; name=”test file.txt”
Content-Description: test file.txt
Content-Disposition: attachment; filename=”test file.txt”; size=9;
creation-date=”Sat, 03 Nov 2012 04:19:07 GMT”;
modification-date=”Sat, 03 Nov 2012 04:19:07 GMT”
Content-Transfer-Encoding: base64

The other user’s email attachment – does NOT work with SharePoint incoming email.

–_000_1DC0208E869FB44799FE92A148DBCE36040A04ACUSSFA1E1402glob_
Content-Disposition: attachment; filename=”winmail.dat”
Content-Transfer-Encoding: base64
Content-Type: application/ms-tnef; name=”winmail.dat”

Notice the difference in the Content-Type fields – mine is text/plain, while his is application/ms-tnef.

We both specified Plain Text message format in Outlook before sending the messages. So what’s causing the difference in attachment format?

After some research on the topic, we’ve stumbled upon this Technet forum thread:

http://social.technet.microsoft.com/Forums/en-US/sharepointgeneralprevious/thread/6ba45d6f-c988-4ac1-a5b2-2f3d3dec1ac0/

The answer in this thread resolved our problem – changing the properties on the remote SMTP domain in Exchange to never use Rich Text format for messages allowed the attachments to work for all users.

Finding out where SharePoint email alias is used

Recently, a question came up in the SharePoint TechNet forums regarding document libraries with incoming email enabled.  If you only know the name of the AD contact for the library, how can you find out which document library or list it’s pointing to? 

Here’s a straightforward PowerShell script which will iterate through every site collection in every web application and return the names and email aliases of every list that has an active email alias specified.


[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."

RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Bud Ratliff blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 401,739 hits