Receive signed e-mails with SPEmailEventReceiver RRS feed

  • Question

  • Hello,

    I have created SPEmailEventReceiver that process incoming e-mails and its attachments. Everything works fine except the processing e-mails that are signed.

    Once the signed e-mail is received, the receiver won't detect any attachments. I'm trying to get attachments from SPEmailMessage.Attachments. Any idea?



    Wednesday, January 14, 2015 1:46 PM

All replies

  • Hi,

    According to your post, my understanding is that you have issue about receiving signed e-mails with SPEmailEventReceiver.

    Per my knowledge, SharePoint implement its own internal Email handler class which takes care of checking permissions, checking email settings for document library and adding the actual items to the list/library.

    You need to make sure you have permission to receive the attachment of the signed e-mails.

    You can override the EmailReceived function for SPEmailEventReceiver to check list settings for user permissions, duplicate files or saving the original email.

    For more information, you can refer to:

    Attachments disappear with custom email event handle

    Best Regards,

    Linda Li

    Linda Li
    TechNet Community Support

    Thursday, January 15, 2015 2:56 AM
  • Hi Linda,

    thank you for your reply.

    I have exact the same code implemented for processing attachments and it works fine when e-mail is not signed. My custom email handler can proccess attachments in e-mail. But it's not working with signed e-mails. It says, the e-mail has no attachments...

    My incoming mails library settings are:

    rootFolder.Properties["vti_emailusesecurity"] = 0;
    rootFolder.Properties["vti_emailsaveattachments"] = 1;
    rootFolder.Properties["vti_emailattachmentfolders"] = "root";//subject, root, sender
    rootFolder.Properties["vti_emailoverwrite"] = 0;
    rootFolder.Properties["vti_emailsavemeetings"] = 0;
    rootFolder.Properties["vti_emailsaveoriginal"] = 1;

    What could be the issue with permission?

    Thank you,


    Thursday, January 15, 2015 10:47 AM