.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
ASPEvil
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Post New Web Links

SharePoint 2010 Incoming Email cannot process file attachment with zero size.

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :SharePoint
 

When sending email with attachments to SharePoint list, if one of the file attached to the email is of size 0, then none of the files will be saved and NO new item will be created in the list.

The SPEmailHandler's ProcessAttachment method should check the length of the "contentStream". If the length is 0, it should return immediately.

As you can see in the ProcessAttachment method none of the arguments are validated before they are used. This an example of poor quality code.

It should do at least

if (contentStream == null || contentStream.Length == 0) return;

if (string.IsNullOrEmpty(fileName) || item == null) return;

 

private static void ProcessAttachment(Stream contentStream, 
                                     
                                            
                                        

View Complete Post


More Related Resource Links

SharePoint 2010 Incoming Email cannot process email file attachment in email with less than sign < a

  

When sending an email which contains an email attachment such as "Hello <World>.msg" from Outlook to SharePoint 2010 email enabled list such as an "Announcements" list, no item is created in the list and the attached email and the orginal email are not saved.

The log file contains

09/23/2010 13:51:17.54  OWSTIMER.EXE (0x18FC)                    0x0B2C SharePoint Foundation          E-Mail                         6873 Warning  An error occurred while processing the incoming e-mail file C:\inetpub\mailroot\Drop\f17ce37101cb5b600000002a.eml. The error was: Illegal characters in path.. 9f265722-74c9-4bd8-9504-ac265f2351d7

Configure Incoming Email in SharePoint 2010 with a remote (public) SMTP Server

  
I have a standalone SharePoint 2010 Installation on my local network. Have configured the SMTP Services and a SMTP domain called "internalcompany.com". Created a hosts file entry also for that - now outlook is able to send emails to this domain; it reaches the drop folder and from there SharePoint picks it up and pushes to the document libraries. So far so good. But obviously this is not what I want to do: my www.company.com is my public domain and mail server is mail.company.com - how do I get the local SMTP point to this address - so that if someone sends an email to shareddocs@company.com (just like any other normal id), it comes to my local server and then SharePoint. How do I do this? Remember, my server is standalone and my network is not domain based and does not have exchange.Karthick

SharePoint 2010 Incoming Email Unique Files are Not Created.

  

SharePoint 2010 Incoming Email Unique Files are Not Created. 

Description: In SharePoint 2010, when the document library is configured to receive incoming emails, the email attachments sent to document library should be saved as files. When files with same names received, the files should be saved with unique names.

Bug: The files with same names are dropped by SharePoint timer services. If the file with the name already exists in the document library, the newer file will not be saved.

Reason: In the SharePoint log, there is an error about "AddUniqueFile failed to create a file or folder. Filename: Dell Order 001.pdf Errorcode: -2130575305"

Checking the errorcode -2130575305, it is about "saveconflict", ErrorCode=-2130575305.

Error setting up incoming email SharePoint 2010

  

Hello

We are setting up incoming email for SharePoint 2010. We have created the OU SharePoint Contacts and enabled delegate control using the user (XYZ\sharepointadmin) which is the identity for the SharePoint Central Administrator application pool.

We delegated the following tasks (account create delete and manage user accounts)

Our Domain Controller Server 2003

Domain Name is: XYZ.local

Configuration for incoming Mail

sharepoint 2010 Document Library - Email as attachment

  

I am disappointed to see that SharePoint 2010 does not appear to offer the ability to send a document from a document library as an attachment.  We use Sharepoint to control our documents as such we forbid, by policy, storing local copies of documents as there is no way to ensure that they are the current version (cached local kept in sync with a sharepoint library is allowed).  When Sales, Marketing, Customer Service wants to send a set of documents to a customer, they currently copy all the documents they need to a temp folder on their computer, attach all the documents from the folder to an email, then delete the temporary folder.  

I was hoping with all the improved integration, that the library and more valuable would be a view of the library (as it is filtered and sorted) would be accessible to use when selecting attachments. Or the reverse - select a set of documents from a library view and choose email as attachment.    

 The closest options I have come up with is to open the library in explorer which allows dragging and dropping the documents into the email, but there does not appear to be a way to search or filter the items in the explorer view of the library. 

Help me out, is there a better way to do this?  Can Sharepoint workspace help me here?   This is a common complaint at my o

ClientAccessPolicy file in SharePoint 2010

  
I am upgrading my Silverlight demo code from the old beta to beta 2 and see that there are a few new considerations for the deployment of ClientAccessPolicy.xml files. In a previous post I demonstrated how to do this for SharePoint 2007. The heartburn that I get with that approach is any site collection owner or designer can drag the file into the site collection and open the site up to unwanted client access issues. In 2010 the virtual path provider no longer serves the files from the root of the site collection

Video: SharePoint 2010 File System

  
This video describes the SharePoint 2010 file system and integration with Visual Studio 2010. (Length: 3:23)

Sharepoint 2010 Enterprise - Word can not open file in sharepoint

  
Hi, In the library shared documents on my first teamsite i uploaded a word 2010 document. When i click on the document my Word starts up but i'm not able to open the document. i'm also getting the following error: could not open http://pcp/Shared Documents/cv.docx. When i upload a document via word (saving the document in the library via word) i can view it when i click on the document. But when i upload an existing document into the library i keep getting the error from above when i'm trying to open it.   Thanks TIM

sharepoint 2007 incoming email

  
Hi all… Configuration incoming email: 1-      Central administration àoperations -àincoming email-à fill all fields 2-      Document setting  à incoming email appeared àconfigure the incoming email And identify the email. It‘s supposed to be like that:  When any one sends email with document attachment to the pervious email this attachment is added to document library. But, it doesn’t work.  are there any other steps ? Thanks

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

  
Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

  
Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

Incomming Email Not Working Correctly in SharePoint 2010

  
Hello everyone, We recently upgraded from SharePoint 2007 to 2010. Prior to the upgrade I had two SharePoint Document libraries setup to receive incoming emails. We had two reports scheduled in Reporting Services and each report emailed a document library once a week. After the upgrade this stopped working. The reason this stopped working was because the file names of the attachments were the same each week, however in 2007, sharepoint would append a random 4 digits to the end of the file name. Was the removed from 2010 on purpose? After discovering this didn't work, I decided to create a workflow on these lists that anytime and item is added go change the file name to include the list ID to ensure that the file names will be unique. Only to find out that items added to the list from the incomming emails do not trigger the workflow. Doing some research on this and it looks like it was turned into Mircosoft as a bug in 2007 which had a fix, but the fix is only for 2007 is doesn't say it applies to SharePoint 2010 so I don't want to install it. Anyone know if there is a fix for this in SharePoint 2010? Thanks in advance, Matt

windows server with sharepoint incoming email

  
Hi all... I need to configure incoming email in sharepoint but I didn't configure the smtp email in server2003 how can i confiure email without active directory , I need to use email to recieve email in sharepoint but sharepoint didn't connect to active directory , it connect to form authentication (users in sql DB) so please, what's steps? Thanks

Incoming E-Mail with attachment not starting SharePoint workflow (VS 2008)

  
I am working on SharePoint 2007 workflow in visual studio 2008. The workflow is attached to an email-enabled list and is supposed to automatically start on incoming email. It works fine when email (without attachment) is sent to the list but the workflow cannot start when the email is sent with attachment. There is no error message but the workflow status field is blank. The attachment field is also blank. When I manually run the workflow, it works fine. This problem happened on Staging and production servers. On Development server, the workflow works fine either way. The list is setup to save attachments. Any help please

How do i force SharePoint to open file automatically during check out process?

  
Currently, when checking out a file (doc., excel, pdf etc.) in Sharepoint, i right click on doc. and click "check out". Then a window pops up and saying " you are about to check out:...." and i choose the option of saving the file in my Local Drafts Folder. The issue is that the file does not open automatically once i click "ok" in pop up window. I have go back to file in SharePoint and click on it again to open it. How do i force SharePoint to automatically open the file, when i go through the check it out process? Thank you all for your feedback.

Incoming E-Mail with attachment not starting SharePoint workflow (VS 2008)

  
I am working on SharePoint 2007 workflow in visual studio 2008. The workflow is attached to an email-enabled list and is supposed to automatically start on incoming email. It works fine when email (without attachment) is sent to the list but the workflow cannot start when the email is sent with attachment. There is no error message but the workflow status field is blank. The attachment field is also blank. When I manually run the workflow, it works fine. This problem happened on Staging and production servers. On Development server, the workflow works fine either way. The list is setup to save attachments. Any help please

file size increase when moving from file system to sharepoint 2007

  
Hi, While moving files from file system to Sharepoint 2007 via windows explorer view, why do file sizes increase? thanks, Burcu  
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend