locked
why email and attachments not separated in email enabled document library? RRS feed

  • Question

  • I noticed that an email-enabled document library sometime separates email and attachments and it ends up with multiple items in the library; sometimes it does and it ends up with one item.

    How do we control this or what is the trick here?

    This is really frustrating!

    thanks,

    Tuesday, April 12, 2011 3:05 PM

Answers

  • I found out why SharePoint mail handler could not extract attachment from a certain type of eml emails. The eml emails not working me were constructed with this structure, using one attachment as example:

    If I removed the highlighted red part, it just worked.

    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a

    Content-Type: multipart/alternative; boundary=--boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad

     

     

    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad

    Content-Type: text/plain; charset=utf-8

    Content-Transfer-Encoding: base64

     

    {body text/plain in base64 string}

    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad

    Content-Type: text/html; charset=utf-8

    Content-Transfer-Encoding: base64

     

    {body text/html in base64 string}

    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad--

     

    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a

    Content-Type: multipart/mixed; boundary=--boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53

     

     

    ----boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53

    Content-Type: application/octet-stream; name=attachment.pdf

    Content-Transfer-Encoding: base64

     

    {attachment in base64 string here}

     

    ----boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53

     

    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a--

    I know little about eml file structure. Either the structure is wrong or the sharepoint has a bug!

    • Proposed as answer by V284 Thursday, April 14, 2011 7:59 PM
    • Marked as answer by Mike Walsh FIN Friday, April 15, 2011 5:31 AM
    Thursday, April 14, 2011 7:48 PM

All replies

  • Are you seeing this behavior in a single email-enabled document library, or across multiple libraries? There are a few settings for enabling Incoming Email in a SharePoint list that may impact what you're seeing, and if you're looking at multiple lists they may be configured differently.

    To get to these settings, open the list or library's settings page from the Settings menu. If you don't see this option, that means you don't have the right to modify these settings for the list or library, so you'll need to talk to its owner about how its configured. In the Settings page, you should see a section labeled Communications. In that section, click the link titled "Incoming e-mail settings".

    In the Incoming E-Mail Settings page, there are a lot of settings that will influence how the library handles incoming email:

    • The first section turns incoming email on and off. I'm assuming that this is set to "Yes" since the library is already receiving email.
    • The second section determines how incoming email and their attachments are grouped. Emails and their attachments can either be stored un-grouped in the root folder, in individual folders by subject or in individual folders by sender. This is the first setting you may want to take a look at, the issue may be with how the list is set up to group these files. You can also determine here if existing files should be overwritten if they have the same name as a new one.
    • The third section lets you chose whether or not to save the original email as a separate file.
    • The fourth section lets you save meeting invitations (useful if you're using a calendar list, it provides another way to items to be added to the calendar list)
    • The final section determines the library's security, which probably isn't the issue here.

    It almost sounds like you're looking at multiple lists, but then again given the way you've worded your post I don't think that's what's happening. If its all one list, the first thing I would suggest is taking a look at those settings above and determining if the library is handling incoming email in accordance with those settings. If they don't seem to jive, it could be that at some point in time in the life cycle of this library someone changed the settings in the second and third sections, which caused items to be stored different before and after those changes. Or that someone manually modified the contents of the library after they were emailed in that led to your inconsistencies.

    If its none of those, can you provide any more information about how you're reproducing those inconsistencies?

    John


    MCITP and MCTS: SharePoint, Virtualization, Project Server 2007
    My books on Amazon: The SharePoint 2010 Disaster Recovery Guide and The SharePoint 2007 Disaster Recovery Guide.
    My blog: My Central Admin.
    Tuesday, April 12, 2011 6:47 PM
  • I have tried all these settings. Let me clarify what I am seeing and looking for:

    If I send an email with attachments to the document library from Outlook 2007, multiple items are created: one for email and one for each attachment.

    I have a DNN site with a Module called Dynamic Forms, which sends an email with an attachment to the document library. The magic happens: only one item is created with the attachment embedded inside the email. This is the problem: I do not get why and how?

    I am wondering if different format/version of emails makes the sharepoint email event handler (Should be?) parse the email differently? However if I open the email eml file in Outlook 2007, the attachment shows up as normal.

    In my company, we see both cases are necessary: sometime the email is not important and we do not need to save it but the attachments in sharepoint (I can handle this use one of the settings you mentioned above); we often need to save both email and attachment either in one item or separately in two items in the document library.

    -- Actually I have a copy of your disaster recovery guide book - A cool one.

    Thanks,


    Tuesday, April 12, 2011 7:54 PM
  • I found out why SharePoint mail handler could not extract attachment from a certain type of eml emails. The eml emails not working me were constructed with this structure, using one attachment as example:

    If I removed the highlighted red part, it just worked.

    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a

    Content-Type: multipart/alternative; boundary=--boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad

     

     

    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad

    Content-Type: text/plain; charset=utf-8

    Content-Transfer-Encoding: base64

     

    {body text/plain in base64 string}

    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad

    Content-Type: text/html; charset=utf-8

    Content-Transfer-Encoding: base64

     

    {body text/html in base64 string}

    ----boundary_1_9786ce6d-49bd-4ef9-9300-4ed4797bd8ad--

     

    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a

    Content-Type: multipart/mixed; boundary=--boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53

     

     

    ----boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53

    Content-Type: application/octet-stream; name=attachment.pdf

    Content-Transfer-Encoding: base64

     

    {attachment in base64 string here}

     

    ----boundary_3_e5f4edb0-f72c-44d3-9cea-f01b51affe53

     

    ----boundary_2_6a659de7-74df-40e1-ab98-225ccc22717a--

    I know little about eml file structure. Either the structure is wrong or the sharepoint has a bug!

    • Proposed as answer by V284 Thursday, April 14, 2011 7:59 PM
    • Marked as answer by Mike Walsh FIN Friday, April 15, 2011 5:31 AM
    Thursday, April 14, 2011 7:48 PM