I email a spreadsheet to SharePoint and I want to save the document not with its original name but with a name built from the title of the email - any ideas please?

For example: doc name is fhdhfjd1234.xls and email title "Cost Centre Report - TYEF". The name I want to see in SharePoint is "Cost Centre Report - TYEF.xls".

I also want to be able to populate the file metadeta using the email content too.

1 Answer 1



You can use SPEmailEventReceiver for your requirement..

And the following should help you

How to enable an Event Handler to intercept upload from email in document library

There is a possibility that when you write SPEmailEventReceiver the attachment doesn't upload directly, in that case you need to programmatically add an item (attachment) to document library and set metadata..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.