none
Problem with Digitally Signed messages. RRS feed

  • Question

  • I have a requirement from my customer to annotate messages with properties.  They currently have the system working in Outlook 2007 but want to upgrade to Outlook 2010.

    I am testing this and I have an issue with digitally signed emails.  I receive a dialog that says "If you save the changes, the message will no longer be digitally signed."

    Ok, I get it... but this was not a problem before. 
    The program I have is an automated program running on a stand alone system.

    Does anyone have any ideas on how I can supress this message or automate selecting that it is okay to make the changes and lose the signature? 

    • Moved by Cindy Meister MVP Thursday, December 20, 2012 3:23 PM Outlook-specific (From:Visual Studio Tools for Office)
    Thursday, December 20, 2012 1:58 PM

Answers

  • Unfortunately, there's nothing in the Outlook Object Model to handle working with Digital Signatures.  As for that dialog, it's possible that you can dismiss it with careful use of the SendKeys command but it's not a very reliable method.


    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Thursday, December 20, 2012 5:34 PM
    Moderator

All replies

  • Unfortunately, there's nothing in the Outlook Object Model to handle working with Digital Signatures.  As for that dialog, it's possible that you can dismiss it with careful use of the SendKeys command but it's not a very reliable method.


    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Thursday, December 20, 2012 5:34 PM
    Moderator
  • Eric, thank you for your reply.  I am sorry for my delay in getting back with you.  The holidays and the flu season has set me back a bit.

    The problem I am having is that I need to move the message to another folder.  The move method within the outlook model does not support this because of a digital signature.  If i dismiss the prompt with a "yes" the message loses the digital signature - which is not allowd by the customer.

    If I dismiss the prompt with a "no" because I do not want to lose the digital signature I get an error (exception from hresult: 0x80004004) and the move fails. 

    I can manually move the message with no error in outlook.   But through .net I cannot accomplish the same task?   My dillemma is that there are about hundreds of these to move every day and they all go into different folders.  I was looking for a Microsoft solution to a Microsoft product and it appears that there is none.

    Wednesday, January 16, 2013 1:49 PM
  • how do you move those messages? can you show us some code?
    Wednesday, January 16, 2013 1:58 PM
  • I have done some testing with this and I think the problem is how I have to get the message with the outlook object model.

    The client's exchange server is archiving every message that passes through their server.  I am tasked to automate the movement of messages to different folders to make searching the archive easier.

    But, the actual message is considered an attachment in another email (which we refer to as an envelope).

    I can move the envelope (but it does not have a digital signature).  The embedded message does have the digital signature and in order to get access to it as a mail item I have to save it as a .msg and then open it as a mailitem.

    I am guessing that this process triggers that some sort of "change" has happened to the message when all I am doing is:

    Outlook.Attachment embeddedMessage = Envelope.Attachments[1];
    embeddedMessage.SaveAsFile("email.msg");
    Outlook.MailItem EmailMessage = (Outlook.MailItem)OutlookNameSpace.OpenSahredItem("email.msg");
    EmailMessage.Move("ArchiveFolder");

    the last line pops up the dialog warning me that saving the message is digitally signed.
    If I open the message envelope in outlook I can drag the attachment to another folder without any prompt.

    Wednesday, January 16, 2013 2:12 PM
  • yes, that is the case. Try manually importing item (msg file) into inbox (drag and drop) and also manually move that mail to some other folder - do you get prompt?

    Wednesday, January 16, 2013 2:30 PM
  • Yes this is the case and therefore because .NET does not provide another way to access the attachments, then I will not be able to use .NET
    Wednesday, January 16, 2013 2:46 PM
  • not necessarily - please check scenario i described and let us know of the outcome, maybe there is a way.
    Wednesday, January 16, 2013 6:40 PM
  • Yes, the dialog appears when the saved msg is manually imported.  My head tells me there has to be a way.  But, it seems there are some limits with the object model because it doesn't have any mechanism for digital signatures.  I don't want to change the message just move it to another folder.  Unfortunatley, it is originally an attachment to an email.

    I appreciate your efforts on the topic.

    Friday, January 18, 2013 12:54 PM
  • i;m afraid problem is with with saving  digitally signed mail that is attached to other mail as msg on disk, everything later is meaningless. i will try to reproduce your problem on monday.
    Friday, January 18, 2013 2:43 PM
  • yes, i understand that saving it to the disk to open it is causing the issue.  It makes sense that it should.  I am surprised that there isn't a better Microsoft solution for this.  At this time, I am moving the envelopes to another folder for processing by another application. 
    Friday, January 18, 2013 3:06 PM