Skip to content

There is a better way! #3

@ddavisso4

Description

@ddavisso4

FYI, investigated what I perceive is a better way to actually do the signing.
https://support.microsoft.com/en-us/help/2636465/how-to-sign-or-encrypt-mail-messages-programmatically

Here's some code:

string PR_SECURITY_FLAGS = "http://schemas.microsoft.com/mapi/proptag/0x6E010003";
int currentSecurityFlags = mailItem.PropertyAccessor.GetProperty(PR_SECURITY_FLAGS);

int updatedSecurityFlags = currentSecurityFlags;
//newSecurityFlagSettings |= 0x1;   //Enrypt
updatedSecurityFlags |= 0x2;     // Sign

mailItem.PropertyAccessor.SetProperty(PR_SECURITY_FLAGS, updatedSecurityFlags);
mailItem.Save();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions