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


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
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